The Worst Programming Language Ever - Mark Rendle - NDC Oslo 2021

preview_player
Показать описание
There's something good you can say about every programming language. But that's no fun. Instead, let's take the worst features of all the languages we know, and put them together to create an abomination with the worst syntax, the worst semantics, the worst foot-guns and the worst runtime behaviour in recorded history. Let's make a language so bad it would make people run screaming to Visual Basic for Applications.

Check out more of our featured speakers and talks at
Рекомендации по теме
Комментарии
Автор

Even better: do memory management like taxes - there is a GC that knows exactly about things to delete, but you still need to manually predict what it would do - and the program crashes some time later if you forgot.

kennichdendenn
Автор

It's not really a programming language, but when maple gives you an error, rather than give information you can use to correct the error it gives you a hyperlink to the relevant help page on their website, many of which simply read "a help page for this error does not yet exist."

matthewparker
Автор

I once used FORTRAN on a Harris computer. It was possible to declare identifiers with numeric names. So you could have an integer variable called 3, and assign it the value 7. From then on, 3 + 4 would equal 11.
So easy to sabotage somebody's code by slipping in a declaration like that.

PhilRgers
Автор

In many cultures the digits '4' and '13' are considered unlucky, so to avoid offence, the compiler will generate an error whenever it comes across these characters. Programmers will be expected to code expressions to avoid these values. Eg, "5-1" and "15-2" would not cause an error. Note that representing 13 by 14-1 would also cause an error since it contains the digit '4'. And there would be no builtin constant for Pi, so programmers would have to come up with their own ways of writing 3.1415 without using the digit 4. Variables that contain the character '4' or '13' would also generate errors. And to make the language kid-safe, it would also generate an error for '69'.

TheNameOfJesus
Автор

Another suggestion from Lua: all variables are global by default, you have to remember to put the “local” keyword every single time if you don’t want weird bugs and memory leaks.

SergeyLergDev
Автор

Hello, I 'd like to say I've fallen in love with BS, and am working on an interpreter for it. Unfortunately, I couldn't get static analysis to work reliably for DELETE, so I added a garbage collector.
Now don't get confused, it's not a collector of garbage, but a collector that IS garbage. It works by clearing all memory every 13 lines unless specifically asked not to do so by writing the line "NOT YET", the space is part of the keyword.
Now I do want programs written with my tools to be compatible with yours, so you still need to DELETE all variables, however my interpreter will only be able to warn you about 5% of missing DELETEs, by crashing at runtime.

FoxDr
Автор

Something I admire about ancient COBOL is the ALTER statement (ALTER labelname1 PROCEED TO labelname2). This has the effect that if you have a "GOTO labelname1" somewhere in your code, it will jump to labelname2 instead (after the ALTER statement has been executed; before that it'll jump to labelname1). Maintaining code with more than one ALTER statement is a horror, which makes it a perfect candidate for BS.

rjeninga
Автор

The idea of allowing anyone to upload an image that can then be downloaded as a "UTF-256" character sounds like something a startup might actually do.

gregory-of-tours
Автор

I noticed that the string interPOLation used the dollar ($) symbol and not the Euro (€). I think using the symbol for the Polish Złoty (zł) would be more appropriate.

TigerWalts
Автор

ideas from MS-office: some instructions should be localized. i.e. goto, gehezu, allerà ... depending on the OS's language. This should also fail for executables, if you run an english EXE in france, it should fail with "goto command unknown, did you mean allerà?". Also depending on locale, the meaning of ", " and "." should be swapped, not only in numbers, but also everywhere else in the language.

Gunstick
Автор

The use of UNLESS is genius. Rudolf Flesch who wrote "The Art of Plain Talk" remarked that sentences which contain "unless" are among the most difficult to understand.

boblangill
Автор

PowerShell has a "Verb-Noun" naming convention for function names, where the noun should be strictly singular, and the verb should be selected from a list of approved verbs. If your code doesn't comply with this, you'll get a warning from the linter (at my previous workplace it was enforced in the validation process). BS should adopt this with a twist: The compiler should fail, whenever it finds an uncomplying function name, and the list of approved verbs should be undocumented, and left for the programmer to figure out.

kemi
Автор

I'm scared to think of what horrors the (clearly battlescarred) audience would have come up with, given more time. Every suggestion gave the reaction of "That's so evil, I love it".
The best I could come up with is requiring any valid source code to be hashed and minted as an NFT by BSCorp in order to compile successfully / without a warning

flamingmojo
Автор

They should definitely take a pillar of programming from the world's fastest embedded language, Lua: Variables are part of the GLOBAL scope unless specified with the "local" keyword. So if you typo a keyword, it won't error, it will instead create a global variable by that name. This will "reduce" compiler errors and maximize fault on the programmer themselves!

FireSiku
Автор

My first programming language I learned as a kid was Pascal. For a long time I couldn't use "else" because the compiler would always return an error whenever I used it and I couldn't figure out what was wrong. At first I was thinking, maybe I have a weird old version of the compiler that doesn't know the word "else", but then I found someone else's programs that I somehow got on the same floppy with Turbo Pascal, peeked into them, and they were using else and it was all right. But I kept getting the same error, so instead of using else I had to close the if section and open another one with the negated clause.
Only after a good while I realised that THOU SHALL NOT PUT A SEMICOLON AFTER THE COMMAND THAT PRECEDES ELSE.

HelmutNevermore
Автор

Guys! There is an obvious oversight! Just like in JavaScript, “this” should not always be “this class”. It should sometimes be some random object in memory, depending on what time the code was run at! Amazing debugging sessions!

norbertnemes
Автор

was so struck by this gem the last time I watched him give this talk that I called it Rendle's Law:

"There's nothing you can suggest that is so unutterably stupid that people won't waste their time attempting it"

mattcroft
Автор

The "feature" I hate most in Excel (as far as the code in excel is programming) is that function names localize to the computer language. So if your computer happens to be set to dutch, or german, or norwegian, or whatever you can't following English language tutorials.
Microsoft even created a function translator you can download in the latest versions of Excel to fix that.

If you choose to make BS interpreted, localize the functions to the language of the computer running it, so you need to offer a version of your script for every language computer.

dms
Автор

I'm a mechanical engineer who knows just enough about programming to know that this is hilarious and would be infuriating to use. It reminds me of a time in school a couple years back when I was talking in some of my classmates about "Anti-CAD, " similar concept for 3d design. Points had to be circles with zero radius, threads had to be made with a virtual tap or die tool (which had to be turned the right number of threads with the mouse)... I forget a lot of the really funny/annoying features but it was a good comedic break from serious study.

ethanbeachy
Автор

Index Origin: Most languages start counting from either Zero or One. BS sets the index origin to simply -1.
APL allows one to dynamically set and modify the index origin to either 0 or 1.
So separate threads may have different values, or the value may vary within a loop, or different functions.
However, if the index origin is undefined in the code, APL uses either 0 or 1 dependant on the users predefined preference, so the value will depend on who is running the code rather than who wrote it.

kgbman