- One executable that is the runtime, accepting one argument: the source code file. - No linters. Code is auto-formatted. - No modules. Includes can be namespaced/aliased. - No package manager. Include by Git URL with tags. - No type annotations. Automatic type-checking. - No user-defined types. A few good types is better. - No null. Set membership with maps is better. - No exceptions. - No loops. List and map compre…
Ask HN: What would be your “perfect” programming language?
161–170 of 182 posts
Re: Ask HN: What would be your “perfect” programming language?
#162Earlier quoted context omitted.
Why not just use elm?
I do, but I miss repl driven development.
Re: Ask HN: What would be your “perfect” programming language?
#163Re: Ask HN: What would be your “perfect” programming language?
#164Earlier quoted context omitted.
If you are not doing shared dependencies, count me out.
Why is that? To be clear the lack of “shared” dependencies does not necessitate code duplication. By shared dependencies I’m talking about languages (Haskell for example) where only one version of a library can be used, which results in the diamond dependency problem (predictably so!). Let’s say file A references file B and C, and files B and C both reference D. D doesn’t need to be duplicated. If all includes are qu…
Yes, if an ecosystem does not attempt to ensure that D is at a single version, which is both B-compatible and C-compatible, it moves a mountain of complexity onto A.
It might not be apparent for a small program that only uses standard library and never experiences diamond dependencies at all. But the complexity here is that
1. A might get a D1 object/structure/result from B, and later
2. A might get a D2 object/structure/result from C, and then
3. Some code may be needed to ensure D1 compatibility with D2, if they interact. This problem is better to be resolved in an ecosystem than in A.
Re: Ask HN: What would be your “perfect” programming language?
#165I m a frontend Developer, So for me React and JavaScript is the perfect programming language. JavaScript makes it easy to develop a responsive design. JavaScript has become integral part of Internet experience because it increased interaction and complexity in website or application. It would not be possible to have responsive website, Content management systems, social media, Mobile friendly ad SEO friendly website/…
Re: Ask HN: What would be your “perfect” programming language?
#166- One executable that is the runtime, accepting one argument: the source code file. - No linters. Code is auto-formatted. - No modules. Includes can be namespaced/aliased. - No package manager. Include by Git URL with tags. - No type annotations. Automatic type-checking. - No user-defined types. A few good types is better. - No null. Set membership with maps is better. - No exceptions. - No loops. List and map compre…
Without loops or general recursion, how would you implement binary search of a list? How would you implement list sorting algorithms like merge sort, bubble sort, or quicksort?
Re: Ask HN: What would be your “perfect” programming language?
#167I'd start with most of the best parts of Delphi/Free Pascal Insanely fast recursive descent single pass compilation. Assignment and equality test have different tokens := vs = Var parameters instead of messing with pointers Functions return values, procedures don't Strings that are automatically reference counted (no allocation or garbage collection to worry about), counted (so you always know how many bytes of text…
Re: Ask HN: What would be your “perfect” programming language?
#168F# is the closest I've found. A pro/con of F# is the .NET ecosystem which has many C#-isms which both accelerate library development and detract from functional styles. - functional - type inference (but not so much to slow down compilation) - not too heavy on type abstraction - multi-threaded - local heaps for actors - cross-platform I'm also disappointed that Pony doesn't have as wide adoption as Rust or Zig.
Re: Ask HN: What would be your “perfect” programming language?
#169I'd start with most of the best parts of Delphi/Free Pascal Insanely fast recursive descent single pass compilation. Assignment and equality test have different tokens := vs = Var parameters instead of messing with pointers Functions return values, procedures don't Strings that are automatically reference counted (no allocation or garbage collection to worry about), counted (so you always know how many bytes of text…
Id be fine with delphi if their IDE was available on other systems like linux or mac. I also kinda find fpc a bit verbose and clunky. Something like an elm interface would make sense I think + the points you laid out
Lazarus-IDE is... I've run it on a Raspberry Pi Zero W in the past.
I've just switched to Ubuntu 22.04 LTS as my daily driver, and am installing Lazarus here as well.
Re: Ask HN: What would be your “perfect” programming language?
#170Earlier quoted context omitted.
No, I want first class algebraic datatypes that don't make easy things hard i.e. https://forum.nim-lang.org/t/904 vs `#[derive(Eq)]`
Libraries exist: https://github.com/haxscramper/nimtraits https://github.com/andreaferretti/patty https://github.com/alaviss/union Again we are not new to this problem and already offer alternatives.