top | item 32081808

Six programming languages I’d like to see

481 points| johndcook | 3 years ago |buttondown.email | reply

441 comments

order
[+] thesuperbigfrog|3 years ago|reply
>> A serious take on a contract-based language

Ada has design-by-contract as part of the language:

https://learn.adacore.com/courses/intro-to-ada/chapters/cont...

Since Ada is used for safety-critical systems programming you could argue that it is very serious about it.

>> And tool integration! One of the coolest things Eiffel sorta did was use contracts to infer tests. If you have contracts, you can use a fuzzer to get integration tests for free.

How about tools that extend design-by-contract to formal verification?

https://learn.adacore.com/courses/intro-to-spark/chapters/01...

SPARK is limited to a subset of Ada, so it is not without limitations, but it can be very useful depending on what you are trying to do.

[+] showerst|3 years ago|reply
I'm a little surprised that nobody has pulled off the "VB6 of javascript". I don't mean one of the purely no-code products, but like a literal "create a new page, drag a button, then double click it to hop into the code for a new route and a new component and go straight into the onclick handler".

Maybe that's harder than I can imagine, or it exists and just isn't a very good idea in practice (how would you even do responsive?) so it's not that popular.

VB was a garbage language by modern standards but I always liked that they gave you a visual builder, but didn't try to hide the coding from you too much.

[+] slaymaker1907|3 years ago|reply
Depending on if you count it as a serious programming language, Racket has pretty much all the contract stuff. It has dedicated syntax for contracts, tight integration with the module system, and contract-random-generate attempts to generate a value satisfying a contract so writing an auto fuzzer wouldn't be too hard. In fact, I think Racket's system predates Clojure since there was the 2002 paper "Contracts for Higher-Order Functions" discussing it and Clojure first appeared in 2007.

The only reason I would ever use Clojure instead of Racket would be if I needed to work with the JVM ecosystem or the browser via Clojurescript (which are compelling reasons).

Totally agree about a good calculator language.

[+] julian_sark|3 years ago|reply
As more of a Sys Admin / scripting type, I felt happy and sad at the same time at the actual mention of Visual Basic.

VB is often scoffed at, and probably to an extend rightfully so.

But those (i.e. VB1 through to VB6) were the ONLY languages that I ever managed to create useful, finished tools and programs in. Maybe it's part psychological, but I needed the approach where I created a neat UI first, got my methods pre-populated for me, and had something tangible to look at early in the process. Then went on to fill it with all with custom code. Yes, it's BASIC, but it was extensible. People I knew wrote OCX and such control elements, and code routines in DLLs in C/C++ and integrated that into VB projects, so the sky was still the limit.

Staring at an empty text document with possibly some header file statements never evoked the same creativity with me that VB did.

p.s. my proudest creation was a Windows 3.1 UI around the MS-DOS packing program "arj", for those who remember. Had I been a better businessman, that might have predated WinZip :)

[+] plainnoodles|3 years ago|reply
A company I used to work for took roughly this path:

1. 1 mildly technical, mostly business-domain person, a spreadsheet + auto-clickers

2. 1.5 persons still only mildly technical and mostly business-domain-y, a VB gui and some basic network integration

3. [some time and quite a bit of revenue passes]

4. they hire some java programmers to rewrite it properly in Swing, since the VB versions had literally become impossible to modify without breaking (there were forked versions where you used version A for some feature, version B for another, version C for another - and people had tried to merge them together while keeping the whole thing working, but never managed it).

It's now been, oh, over a decade I suppose, and while I understand that there are currently some efforts underway to port the java applications to an SPA web app, it's more because the owner wants to get rid of java (and only have to hire python devs) than because the apps don't work or are hard to maintain.

My point is that without VB, the company probably wouldn't have existed to even need the Swing rewrite. So while I personally find VB to be quite caustic to my senses, I cannot deny its ability to create business value, especially because it's so approachable only mildly-technical folks.

[+] implements|3 years ago|reply
> But those (i.e. VB1 through to VB6) were the ONLY languages that I ever managed to create useful, finished tools and programs in.

Have you tried Delphi?

https://en.wikipedia.org/wiki/Delphi_(software)

- my experience was in the 90s, but it has a similar ‘quickly build native Windows UI programs’ feel to it.

[+] dbotton|3 years ago|reply
CLOG and the full UI builder CLOG Builder do exactly what you are looking for.

It already offers plugin controls that work with the builder or just code.

Can deliver native local apps, websites, webapps, iOS and Android apps, etc.

Database controls like in VB and Delphi - and much more to come.

It is programmed in and with Common Lisp, however you can easily program events in JavaScript and Python coming soon too.

https://github.com/rabbibotton/clog

[+] analog31|3 years ago|reply
I probably wrote my best "software" in VB too, i.e., stuff that hung together well enough for others to use over a long time period. One of my programs is still used daily in the factory, with virtually zero failures in 14 years.

What happened was that I lost interest in creating that kind of thing. And the business decided that such programs have to go through a formal approval and release process, so it left me with no advantage over letting the software department maintain that stuff at considerably greater expense. Today, I'm willing to burden my users with stuff that requires a bit more care and feeding on their part, such as plain Python scripts. Also, VB turned into VB-dot-net.

I'm equally creative in C, but on the embedded side. Something about working within severe limitations. I'm reminded of a quote from Richard Feynman: “The game I play is a very interesting one, it’s imagination in a tight straitjacket.”

[+] xyproto|3 years ago|reply
Gambas and Lazarus covers a lot of ground, but I also miss a system where you can easily go from an UI designer directly to a small self-contained executable, and then start to add in code.

Visual Go, Visual Rust, Visual Nim and Visual Crystal, where are you?

[+] Ken_At_EM|3 years ago|reply
I don’t understand the the purely psychological disdain for Basic.

I developed in an odd Language…LabVIEW…and I get what you’re talking about with first class GUI support and being able to see something each step along the way.

[+] silisili|3 years ago|reply
Same. Well, GUI based projects that is. When I learned C++ the effort to recreate some of my VB work just seemed so mindnumbingly long and boring. Which was probably to my detriment...if it were the only way, what fun. But when you know the easier way, you question why.

Myself and a lot of kids probably grew up on VB. I was one of those annoying kids writing AOL 3.0 'progs.' I don't think I've ever had as much fun coding as those days, but that's probably due to age and community moreso than VB's greatness.

[+] bee_rider|3 years ago|reply
I was a little late full-on BASIC, but enjoyed writing little TI-BASIC programs on my calculator.

I don't know why people would scoff at BASIC, tons of people make their careers writing Python, which is 100% going to be regarded as the BASIC of 201X-202X.

[+] Devasta|3 years ago|reply
VB was the peak of computing, modern dev wishes it was as capable.

One of the truely great things about the drag and drop form builder was being able to sit with a user and go through requirements with them, to wire it all up later.

"Ok, so when you type in the customers details, we should have a button to save them into the database. Will we put it here?"

[+] decremental|3 years ago|reply
I got into programming with VB when I was a kid and made a hundred little projects in VB6. It was so much fun browsing Planet Source Code looking for cool stuff.
[+] int_19h|3 years ago|reply
This part of the experience didn't fundamentally change between VB6 and .NET with WinForms - when you create a WinForms app project in VS, you still get a blank form to place controls, double-click on them to create the appropriate event handlers etc.

And this all still works today in VS 2022.

[+] asiachick|3 years ago|reply
Was is because of the language or because of the IDE/Environment/Library?

My impression is VB is a language sucks but VB the entire package (forms, form editor, IDE, etc) was pretty awesome.

So the arguably a similar IDE with a better language would be a huge win.

[+] ransom1538|3 years ago|reply
I made good coin coding in vb6. Usually I was automating reports (that clients paid for). People would do a job then sit down and create 30 spreadsheets to send out to clients. I created software to pump all these out in seconds. Excel sheets with graphs, intricate layouts and formulas. 15 years later I think they finally have a working web version. I got consulting asks for a decade.

The weirdest thing (I have ever seen in software): Once VB.net hit, all VB devs quit. VB.net was a totally different language. I guess we all moved on.

[+] jerf|3 years ago|reply
The reactive programming language one is really interesting. A compiler ought to be able to compile "normal" straight-line code into conventional efficient code. It's hard to know how that sort of thing would "pollute" the rest of the code, though, like, will every program turn into a rat's nest of dependencies such that it's just impossible to manage or what? Hard to tell without trying, especially since developing such a language would also require significant effort into developing a standard library and best practices to go with it even if the language was in hand today. And one hell of a debugger. Circular dependencies are a problem, too; I'm inclined to ban them but that's probably beyond what a type system can help you with, or at least, any type system I currently know, so it's going to be an adventure.

Still, there's a lot of things that would be more useful with such a language. In-memory highly-correct cache invalidation would become trivial code to write. In fact I think the cache would actually update itself live. Out-of-memory cache invalidation might be pretty easy. Certain auditing things would be easy. UIs would probably take some work to get right but would be interesting, at the very least. Game programming would also be interesting; a lot of game patterns would be incorporated into the language at that point.

Probably need to be lazy; I suspect proactively recalculating everything all the time would be a bad idea. Haskell has pushed lazy programming a long way, but "re-thunkifying" a previously calculated cell would be a new frontier.

Come to think of it, while I think the performance could be improved and you'd want to lift up to a full language eventually, I think a good Haskell programmer could bash together a prototype of this in a few days and start playing with it. It's going to need a lot of playing with before someone casts it into concrete as a language specification and corresponding compiler and runtime.

[+] cmontella|3 years ago|reply
I'm attempting to build such a language (you can find a link in my profile if you're interested. I don't want too much attention yet since I'm planning on a first release later in the year). You're right it can become difficult to follow code when it's not presented in a linear fashion. The flip side though is that you can write code in smaller chunks that can do a lot, so you write far fewer lines overall. The other thing is that it opens the door to more advanced tooling than we're used to as developers: things like time travel debugging, saving program state and querying it, or running hypothetical execution paths to find the best one. Bret Victor is famous for demoing prototypes of these debugging tools in one of his talks, and they are finally becoming real.

My language turns out to be very fun to write UIs and games in, so I'm glad you honed in on those two examples. Actually one way to view it is that it's a programming language with a game engine as a runtime. But robotics is the primary application I'm targeting.

In fact I had to choose between lazy and eager evaluation, and I've chosen eager because I want latency guarantees. With a lazy evaluation scheme, I was unsatisfied with the windup that would occur in some situations that would totally blow performance. And we don't have to recalculate everything all the time; we only have to recalculate the paths that have an input change. This may lead to recalculating everything, but most of the time we only have to focus on the execution path that is "dirtied" by the updated input.

Anyway if you want to test drive such a language as you're imagining, send me an email and I'll give you a tour/demo. The language isn't really user-friendly yet so there are some pointy edges that make it unusable to new users at this time (which is the main reason I don't want more attention on it until that is resolved.)

[+] yencabulator|3 years ago|reply
For what it's worth, Svelte https://svelte.dev/ is a Javascript-to-javascript compiler that adds reactive statements to the language (by using the $ label):

   $: b = a + 1
Since it's a compiler, it knows what inputs were used in that statement, and what outputs were mutated. The statement is re-run every time its inputs change.

This is then used to make a web development environment where "react to input changing" is much more natural than with e.g. React.

[+] imaltont|3 years ago|reply
I think the Lisps, and especially Common Lisp, in addition to Smalltalk gives you a lot of the things you mention here. That interactive development environment where you can compile any code at any time is almost a given in these, with example programs such as GNU Emacs and Nyxt, that can be reprogrammed on the fly in release mode too. It is pretty interesting to look at and play with, if you fire up something like Emacs + Slime/Sly and SBCL for Common Lisp or the bundled IDE for a Smalltalk such as Squeak or Pharo.
[+] rwmj|3 years ago|reply
The reactive language was how I thought Mathematica notebooks should work when I first encountered them, and I was very disappointed to find out they don't. Maybe there's a Jupyter extension to do it?
[+] aidos|3 years ago|reply
Mobx works fairly well like this and in our case we use it for the UI where it works well. At the centre you have your pure data and then a bunch of transformations on the way out to your interface (eg, you have a list of all cars, but you have a computed function of all cars available for sale sorted by price). Then at the top, only stuff that’s actually currently used for rendering needs to be computed at keep hot.
[+] asiachick|3 years ago|reply
My experience with reactive systems is they work well for small projects but once the data gets large the overhead of being reactive kills perf.
[+] Smaug123|3 years ago|reply
Mathematica is a decent general-purpose language (though closed-source) and its "map the factorial function over the list" is exactly the same length as the quoted J code:

    #!&/@l
It has the same "everything is a list" problem - it's really verbose at handling strings, for example, and last I checked its date-time handling was not only verbose but also [flat-out wrong](https://mathematica.stackexchange.com/q/239480/30771). But it does support the dynamism mentioned immediately below, if you use `SetDelayed` (`:=`) rather than `Set` (`=`).
[+] cletus|3 years ago|reply
None of these are top of my list. Mine is a better PHP.

To be clear, I like PHP. It actually has many attributes that make it almost ideal as a Web development language, most notably:

1. Pretty much everything is request-scoped. This makes it a lot harder to leak resources when everything is torn down;

2. A stateless functional core. This avoids a lot of class loading that has dogged Java (as one example);

3. No ability to start threads. This is actually a positive. Most application code should avoid creating threads like the plague.

But PHP comes with a lot historical cruft. It's type system is also primitive (Hack is a better example of this).

Where I think this could really shine is in data analysis (ie the numpy/scipy realm).

[+] cardanome|3 years ago|reply
You might want to revisit PHP. It is getting better with every release. We have enums, match expressions, union types and much more now!

As for the type system, haven't worked Hack but I absolutely love the gradual typing experience that PHP offers. Yeah, we had some things that could not be expressed but they are slowly being added, again we have finally union types!

I would even say PHP might be the only mainstream language that offers a first class gradual typing experience.

In Python your type hints are a lie as they are not enforced at all and different linter will give you different results and there is no standard.

In JS, you have to use a whole other languages that compiles down to it, slowing you down with an extra compile step.

Meanwhile PHP just works. Just use PHPstan for linting but even if you don't you get at least runtime checks.

[+] mikece|3 years ago|reply
> 1. Pretty much everything is request-scoped.

I don't know if it's changed recently but that's something I really appreciated when I wrote PHP: it was unabashedly singular in it's purpose as a web scripting language. The source article talked about VB6 as being a language where the GUI was a first class thing; for PHP the only focus was on making applications around web requests. No useless bloat while trying to be a general purpose shell scripting language; no delusions of grandeur of trying to be an enterprise business logic tier language... it did it's one task, did it well, and left other languages to other tasks. I think we would be better served to have languages will small standard libraries focuses on specific tasks rather than gigantic one-language-to-do-everything but about which nobody could possibly know everything (ahem C# ahem).

[+] jjice|3 years ago|reply
> 1. Pretty much everything is request-scoped. This makes it a lot harder to leak resources when everything is torn down;

I write PHP every day (just took a break from that to be here) and the request scoped content is both a nice thing and a pain in the ass some times. It's great that each request is on it's own - really handy for cleanup like you mentioned. There are some thing I want to be shared though, like a DB connection pool, a caching layer (one layer below my Redis layer), and clients for various other services.

Not the end of the world, but an example is AWS Secrets Manager libraries for Python support secrets caching, but they can't offer that in PHP since we won't be able to share the objects. You can use the file system, but that comes with its own hosts of quirks.

That said, PHP really is a fine language. I'm personally not a fan of the use of truthy/falsy values, but they've really dove head first into solid type support. Lot's of good progress has been made with it.

[+] dfan|3 years ago|reply
Inform 7 is the closest thing I can think of to "everything is a graph". Basically, objects in the world are vertices and relations are edges. When you first encounter relations they don't necessarily seem that exciting, but it turns out that having relationships between objects be a first-class concept really changes the way you think about and design systems.
[+] mazesc|3 years ago|reply
Ada is already mentioned here.

You also want to look at Dafny for a contract-based language: https://github.com/dafny-lang/dafny

Since it has verification support it also covers the second point about semantic relations.

[+] danaugrs|3 years ago|reply
Nice article! I'm building a language (https://flame.run/) in Rust that aims to have WebGPU+GUI support built-in. I'm playing with refinement types, which you effectively described in the second-to-last section. I'm not familiar with contract-based languages (other than Solidity), but I think refinement types would allow specifying function parameter requirements in a similar fashion to what you described in your contract-based language section.
[+] lkrubner|3 years ago|reply
> A serious take on a contract-based language

In Shen, the contract rules applied on each function are themselves a Turing complete language::

https://thestrangeloop.com/2014/shen-a-sufficiently-advanced...

https://shenlanguage.org

"static type checking based on sequent calculus"

"one of the most powerful systems for typing in functional programming"

[+] nudpiedo|3 years ago|reply
I had hopes in Shein but it was way too ambitious with way too less design (in the sense of UI/UX and art).

Shein never became a serious language. It's highest point was when @deech made a talk about it and it also promoted their klambda but it had constant problems on every single aspect of the system and the design, from code size expanded as macros to unusable APIs due inconsistent design of libraries and features the author collected from everywhere. I even bought the book and felt deceived after it's unsuitability for anything other than academic examples on how to implement itself.

[+] carapace|3 years ago|reply
Joy (implemented in Prolog) could tick some of these boxes.

> window2 is an optimized version of window1 and should have the same outputs for every input. I should be able to encode that in the language, and have the tooling generate checks showing the two are the same, and also run benchmarks testing if the optimized version actually is faster.

That should be possible with Joy, it's certainly something I want to explore. The interesting semantic relationships are those that let the machine automatically deduce optimizations

> I also like the idea of modifying function definitions at runtime. I have these visions/nightmares of programs that take other programs as input and then let me run experiments on how the program behaves under certain changes to the source code. I want to write metaprograms dammit

Lotta metaprogramming in Joy. Many functions work by building new functions and running them, it's a natural idiom in Joy.

- - - -

> A language designed around having first-class GUI support

Red? ( https://www.red-lang.org/ )

> Visual Interface Dialect ... is a dialect of Red, providing the simplest possible way to specify graphic components with their properties, layouts and even event handlers. VID code is compiled at runtime to a tree of faces suitable for displaying.

https://github.com/red/docs/blob/master/en/gui.adoc

> You can’t work with strings, json, sets, or hash maps very well, date manipulation is terrible, you can barely do combinatorics problems, etc etc etc. I want a language that’s terse for everything.

That also sounds like Red.

[+] krmboya|3 years ago|reply
Imagine if the computing world would have standardized on Lisp and Smalltalk 40 years ago.

If Alan Kay had got microprocessor companies to steal the Xerox microcode design like they got Apple to steal the GUI design, then the genius compiler engineers optimized the the heck out of it all.

I can only shudder at what the supercomputer in my pocket would be capable of.

[+] kitd|3 years ago|reply
I'd like to see a language that can clearly model concurrency using a Petri Net-like structure, ie a data flow language with flexible state/transition handling.

Technically, the runtime is the easy part (relatively speaking). Modelling an array of swimlanes on a plain-text 2D page is the real challenge here IMO.

[+] bmitc|3 years ago|reply
Can you say more about this or have any particular references or applications? This seems interesting, and I'd like to know more. Is there any reason why this couldn't be a full 2D visual language, if done right?
[+] openfuture|3 years ago|reply
I'm doing something along these lines.
[+] Banana699|3 years ago|reply
>A really dynamically-typed language

Raku, previously known as Perl6, has this[1].

sub MAIN(Int $a, Int $b where 10 < $a < $b > 20) { say "OK: $a $b"; }

You can also pull out the "Where" clause to ouside the function and make it define a new type.

Raku is a very awesome language in general, for more reasons than one.

[1] https://andrewshitov.com/2020/08/14/the-pearls-of-raku-issue...

[+] bjourne|3 years ago|reply
But does it generalize? $a > 10 is easy but what if you want "where $a and $b are coprime"? Or a subtype of the integers of all prime numbers.
[+] Lichtso|3 years ago|reply
About "Everything is a Graph", I tried to design programming languages for graph processing a few year back. The problem here is the "language" part as language always implies sequence (because that is what text is). Sequences of statements just don't cut it. In order to efficiently work with graphs, you need to work in graphs. Thus, it becomes a program graph rather than a programming language. And at that point you run into issues of general tooling. Every single tool ever invented around programming is used in combination with text and sequences.

In retrospective it is funny how everybody implicitly assumes that the next big thing will be yet another programming language. And I am not talking about no-code or AI code synthesis.

[+] vchuravy|3 years ago|reply
> A better calculator language

Especially with reactive programming as an ask there, I would recommend Julia with Pluto.jl (Pluto is a reactive notebook).

> A really dynamically-typed language

Julia ;) It is really dynamic, has meta-programming (macros + staged functions), solid semantics around eval/invokelatest that still allow for optimizations and you can add types at runtime (not modify them though).

[+] fjfaase|3 years ago|reply
If you mean with a Graph language, a complex data structure language, you might have a look at https://github.com/FransFaase/DataLang which gives some ideas about modelling complex data structures and where I talk about the different kind of reference that you might want in such a language.
[+] geoffeg|3 years ago|reply
I'd like to see more languages with built-in, language level support for unit tests. Pyret (https://www.pyret.org/) does this but is considered a "learning language". I'm aware that to many people co-locating units tests with the functions they're testing is "bad" but I find it to be quite the opposite. The two are so tightly coupled that having the unit tests in a separate file, sometimes in a separate source tree, is counterintuitive to me.