problem about language-features-Collection of common programming errors


  • finnw
    c++ arrays language-design language-features array-initialization
    When we initialize an array like this int a[5] = {0}, the compiler makes all 5 elements 0. That is really good, compact-initialization and useful feature. But I wonder why the compiler doesn’t initialize int a[5]={1} similarly? Why does it not make all 5 elements 1? Why the Standard doesn’t mandate i

  • VirtuosiMedia

  • 7 revs, 3 users 87%Alexey

  • There is nothing we can do

  • Jason Bunting
    javascript language-features language-design
    I just came across an interesting situation in Javascript. I have a class with a method that defines several objects using object-literal notation. Inside those objects, the this pointer is being used. From the behavior of the prog

  • none
    refactoring language-features language-design automated-refactoring
    What are common traits/properties of programming languages that facilitate (simplify) the development of widely automated source code analysis and re-engineering (transformation) tools?I am mostly thinking in terms of programming language features that make it easier to develop static analysis and refactoring tools (i.e. compare Java vs. C++, the former of which has better support for refactoring).In other words, a programming language that would be explicitly designed to provide support for automated static analysis and refactoring right from the beginnin

  • mizipzor

  • 5 revs, 3 users 53%Shog9

  • ORM

  • mikez302
    javascript language-features
    In php, if you have the following code:$map = array(“first” => 1,”second” => 2 );$map[“third”] = 3;foreach($map

  • Jonas Söderström

  • Claudiu

  • Schnizel1337
    c++ language-features
    I just found this strange anomaly of the type bool and I want to know, why is this possible?!test application: bool test = false; // == 0 printf(“value of test: \n”, test

  • Christoph
    javascript null language-features undefined
    In JavaScript, there are two values which basically say ‘I don’t exist’ – undefined and null.A property to which a programmer has not assigned anything will be undefined, but in order for a property to become null, null must be explicitly assigned to it.I once thought that there was a need for null because undefined is a primitive value and null an object. It’s not, even if typeof null will yield ‘object’: Actually, both are primitive values – which means nei

  • Bill the Lizard
    javascript language-features
    I saw this thread, but I didn’t see

  • Will
    javascript language-features
    The Spider-Monkey JavaScript engine implements the noSuchMethod callback function for JavaScript Objects.This function is called whenever JavaScript tries to execute an undefined method of an Object.I would

  • lillq
    c macros preprocessor language-features language-design
    I have written a little bit of C, and I can read it well enough to get a general idea of what it is doing, but every time I have encountered a macro it has thrown me completely. I end up having to remember what the macro is a and substitute it in my head as I read. The ones that I have encountered that were intuitive and easy to understand were always like little mini functions, so I always wondered why they werent

  • 5 revs, 2 users 100%eyelidlessness

Originally posted 2013-11-09 22:50:22.