Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: What would your ideal programming language look like?
1 point by _callcc on July 29, 2015 | hide | past | favorite | 6 comments
Extra points for original ideas, syntax or semantics.

Perfectly OK to argue for existing languages too. (Why not?)



Why would it be one language? There's no such thing.

I write glue code for CLI tools a lot. Something specialized similarly to shell is required.

I write networking code at various levels, sometimes on top of HTTP, other times I need linewise protocol with SSL/TLS, and sometimes I need to work with raw IP packets or ethernet frames.

I need sometimes to interact with operating system closely. A necessity to have ABI easily translated to what C gives.

There are times when I need fast program with very small memory footprint, so I need clear control over memory usage.

No single language nor runtime can fulfil all these (barring uselessly general statement that "Linux is such thing"). It's a norm for me to juggle with three or four languages at the same time on a single project.


Elixir, without the clumsy anonymous function calls (eg.: `sum.(1,2)`. Everything else is pretty much what I want: Functional, not too strict in purity, concurrent, compiled, dynamic, optional static typing, tests in the language core (not an afterthought), first-class comments with doctests, piping, pattern matching.

I admit it: syntax matters for me, I'm actually more productive when dealing with truly elegant code. Also I don't do systems level programming (Rust seems interesting for this if I ever need it)


It's possible this exists already, I haven't researched it that heavily, but..

Effectively what I want is a high-level scripting language with 'c-like' syntax, that can be compiled into a static binary, to allow easier distribution of (in particular) shell utilities.

I have a feeling Go may come close, but I have a vague feeling I wasn't crazy about the syntax of it.


Felt the same about Go syntax. For scripting in C I've had some fun with tcc: "C script supported : just add '#!/usr/local/bin/tcc -run' at the first line of your C source, and execute it directly from the command line."[0]

[0] http://bellard.org/tcc/


Thanks for the reference I'll look into it.. I haven't written C since I was a student but I kind of figured it would always be too low level to be a good choice for most shell utilities.

e.g. I want to just allocate a string to a variable, I don't want to worry about the length of the string in memory etc.

I looked briefly at stuff like Squirrel, but it seems largely abandoned these days, and as far as I can tell to compile it requires a C/C++ host app, you can't just compile a .nut file(s) to an executable, and as a scripting language obviously requires installing the Squirrel Shell runtime first.


Basically Rust. I'm not crazy about the syntax. It's more the philosophy and goals that I absolutely love.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: