Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the worst programming language you ever worked with? [closed]

People also ask

What is the hardest programming language ever?

Malbolge. Malbolge is the toughest programming language as it took at least two years to write the first Malbolge program. It is a difficult one as it uses an obscure notation, and it is a self-modifying language that results in erratic behaviour.

Why is C an unsafe language?

C and C++ are unsafe in a strong sense: executing an erroneous operation causes the entire program to be meaningless, as opposed to just the erroneous operation having an unpredictable result. In these languages erroneous operations are said to have undefined behavior.


PHP (In no particular order)

  • Inconsistent function names and argument orders
    • Because there are a zillion functions, each one of which seems to use a different naming convention and argument order. "Lets see... is it foo_bar or foobar or fooBar... and is it needle, haystack or haystack, needle?" The PHP string functions are a perfect example of this. Half of them use str_foo and the other half use strfoo.
  • Non-standard date format characters
    • Take j for example
      • In UNIX (which, by the way, is what everyone else uses as a guide for date string formats) %j returns the day of the year with leading zeros.
      • In PHP's date function j returns the day of the month without leading zeros.
  • Still No Support for Apache 2.0 MPM
    • It's not recommended.
    • Why isn't this supported? "When you make the underlying framework more complex by not having completely separate execution threads, completely separate memory segments and a strong sandbox for each request to play in, feet of clay are introduced into PHP's system." Link So... it's not supported 'cause it makes things harder? 'Cause only the things that are easy are worth doing right? (To be fair, as Emil H pointed out, this is generally attributed to bad 3rd-party libs not being thread-safe, whereas the core of PHP is.)
  • No native Unicode support
    • Native Unicode support is slated for PHP6
    • I'm sure glad that we haven't lived in a global environment where we might have need to speak to people in other languages for the past, oh 18 years. Oh wait. (To be fair, the fact that everything doesn't use Unicode in this day and age really annoys me. My point is I shouldn't have to do any extra work to make Unicode happen. This isn't only a PHP problem.)

I have other beefs with the language. These are just some. Jeff Atwood has an old post about why PHP sucks. He also says it doesn't matter. I don't agree but there we are.


XSLT.

  • XSLT is baffling, to begin with. The metaphor is completely different from anything else I know.
  • The thing was designed by a committee so deep in angle brackets that it comes off as a bizarre frankenstein.
  • The weird incantations required to specify the output format.
  • The built-in, invisible rules.
  • The odd bolt-on stuff, like scripts.
  • The dependency on XPath.
  • The tools support has been pretty slim, until lately. Debugging XSLT in the early days was an exercise in navigating in complete darkness. The tools change that but, still XSLT tops my list.

XSLT is weird enough that most people just ignore it. If you must use it, you need an XSLT Shaman to give you the magic incantations to make things go.


DOS Batch files. Not sure if this qualifies as programming language at all. It's not that you can't solve your problems, but if you are used to bash...

Just my two cents.


Not sure if its a true language, but I hate Makefiles.

Makefiles have meaningful differences between space and TAB, so even if two lines appear identical, they do not run the same.

Make also relies on a complex set of implicit rules for many languages, which are difficult to learn, but then are frequently overridden by the make file.

A Makefile system is typically spread over many, many files, across many directories. With virtually no scoping or abstraction, a change to a make file several directories away can prevent my source from building. Yet the error message is invariably a compliation error, not a meaningful error about make, or the makefiles.

Any environment I've worked in that uses makefiles successfully has a full-time Make expert. And all this to shave a few minutes off compilation??


The worse language I've ever seen come from the tool praat, which is a good audio analysis tool. It does a pretty good job until you use the script language. sigh bad memories.

Tiny praat script tutorial for beginners

  • Function call

    We've listed at least 3 different function calling syntax :
    • The regular one

      string = selected("Strings")

      Nothing special here, you assign to the variable string the result of the selected function. Not really scary... yet.

    • The "I'm invoking some GUI command with parameters"

      Create Strings as file list... liste 'path$'/'type$'

      As you can see, the function name start at "Create" and finish with the "...". The command "Create Strings as file list" is the text displayed on a button or a menu (I'm to scared to check) on praat. This command take 2 parameters liste and an expression. I'm going to look deeper in the expression 'path$'/'type$'

      Hmm. Yep. No spaces. If spaces were introduced, it would be separate arguments. As you can imagine, parenthesis don't work. At this point of the description I would like to point out the suffix of the variable names. I won't develop it in this paragraph, I'm just teasing.

    • The "Oh, but I want to get the result of the GUI command in my variable"

      noliftt = Get number of strings
      Yes we can see a pattern here, long and weird function name, it must be a GUI calling. But there's no '...' so no parameters. I don't want to see what the parser looks like.
  • The incredible type system

    (AKA Haskell and OCaml, praat is coming to you)
    • Simple natives types

      windowname$ = left$(line$,length(line$)-4)

      So, what's going on there? It's now time to look at the convention and types of expression, so here we got :

      • left$ :: (String, Int) -> String
      • lenght :: (String) -> Int
      • windowname$ :: String
      • line$ :: String
      As you can see, variable name and function names are suffixed with their type or return type. If their suffix is a '$', then it return a string or is a string. If there is nothing it's a number. I can see the point of prefixing the type to a variable to ease implementation, but to suffix, no sorry, I can't
    • Array type

      To show the array type, let me introduce a 'tiny' loop :
      
          for i from 1 to 4
              Select... time time
              bandwidth'i'$ = Get bandwidth... i
              forhertz'i'$ = Get formant... i
          endfor
          

      We got i which is a number and... (no it's not a function)
      bandwidth'i'$
      What it does is create string variables : bandwidth1$, bandwidth2$, bandwidth3$, bandwidth4$ and give them values. As you can expect, you can't create two dimensional array this way, you must do something like that : band2D__'i'__'j'$

      http://img214.imageshack.us/img214/3008/scaredkittylolqa2.jpg
    • The special string invocation

      outline$ = "'time'@F'i':'forhertznum'Hz,'bandnum'Hz, 'spec''newline$'" outline$ >> 'outfile$'

      Strings are weirdly (at least) handled in the language. the '' is used to call the value of a variable inside the global "" string. This is weird. It goes against all the convention built into many languages from bash to PHP passing by the powershell. And look, it even got redirection. Don't be fooled, it doesn't work like in your beloved shell. No you have to get the variable value with the ''

    • Da Wonderderderfulful execution model

      I'm going to put the final touch to this wonderderderfulful presentation by talking to you about the execution model. So as in every procedural languages you got instruction executed from top to bottom, there is the variables and the praat GUI. That is you code everything on the praat gui, you invoke commands written on menu/buttons.

      The main window of praat contain a list of items which can be :

      • files
      • list of files (created by a function with a wonderderfulful long long name)
      • Spectrogramm
      • Strings (don't ask)
      So if you want to perform operation on a given file, you must select the file in the list programmatically and then push the different buttons to take some actions. If you wanted to pass parameters to a GUI action, you have to follow the GUI layout of the form for your arguments, for example "To Spectrogram... 0.005 5000 0.002 20 Gaussian " is like that because it follows this layout:

      http://img7.imageshack.us/img7/5534/tospectrogramm.png

    Needless to say, my nightmares are filled with praat scripts dancing around me and shouting "DEBUG MEEEE!!".

    More information at the praat site, under the well-named section "easy programmable scripting language"