Slashdot Mirror


Ask Slashdot: What Are the Strangest Features of Various Programming Languages?

itwbennett writes: Every programming language has its own unique quirks, such as weird syntax, unusual functionality or non-standard implementations -- things that can cause developers new to the language, or even seasoned pros, to scratch their heads in wonder (or throw their hands up in despair). Phil Johnson has rounded up some of the strangest — from the + operator in JavaScript to the trigraphs in C and C++ and indentation level in Python. What programming language oddities cause you the most grief?"

5 of 729 comments (clear)

  1. Re:Lua[0]? by Anonymous Coward · · Score: 5, Funny

    Bookkeepers, shepherds, scientists and mathemaitcians have for centuries counted starting with 1. It is recent computer scientists that started this crazy standard break, as if they knew better how to count.

  2. Re:Powershell by Vlad_the_Inhaler · · Score: 5, Funny

    I'm from a different generation. When I was learning things there were attempts made to make languages somewhat failsafe by avoiding ambiguity. Then I saw the C syntax.
    - if (a = b) assigns the contents of b to a and executes the code following if b <> 0. Who the hell thought that would be a good idea?
    - sizeof(string) (I may have got the name of the function wrong) returns the length of a single byte rather than the length of the entire string. Who the hell thought that would be a good idea?
    - strings terminated by a binary zero rather than their physical size. Who the hell thought that would be a good idea?

    Kids grew up with this idiocy, I program in Fortran, Cobol, even Assembler to avoid that mess. Oh, and buffer-overruns have been a serious security problem for years now. Well what a f****** surprise.

    --
    Mielipiteet omiani - Opinions personal, facts suspect.
  3. If you print a lot and want a ink spare language by NotInHere · · Score: 5, Funny

    use whitespace. Be warned, several problems have been reported when posting source code to the internet.

  4. Re:Powershell by lister+king+of+smeg · · Score: 4, Funny

    Powershell is just enough like Bash to make me groan after ten minutes and ask "Why the f--- didn't they just make an integrated Bash shell?"

    Powershell - the ugly the bastard child of Bash and Batch.

    --
    ---Saying gnome 3 is better than windows 8 not so much a compliment as it is damning with light praise.
  5. Re:Null Terminated Strings by zephvark · · Score: 5, Funny

    Nonsense. C is a more elegant weapon for a more civilized age. It's a shame that mass-produced coders have to rely on blasters.