Live data from Hacker News

Sylph: the programming language I want

eev.ee

71–80 of 119 posts

Re: Sylph: the programming language I want

#73
post #69

The lang I want would be mixture of C, C++, Go, Rust, Julia, JavaScript 6, PHP 7, Swift, Lua. * Optional typing (like PHP7/Hack/ES7) * support for compilation (statically linked native binaries) and JIT (like Visual Basic 6 with its P-Code) * memory safety (no null/dangling pointers like Rust) * procedural & object oriented & functional style (like JavaScript/PHP/C++) * modern base standard library / API (like C/Go/J…

"modern base API", what does that mean?

Re: Sylph: the programming language I want

#74
the section on loops, in particular, really captured a small but ubiquitous frustration in every language I've used. we really should be able to say "this is the first iteration", " this is the last iteration" (though that one might not always be possible) and "did the loop run at all?" without getting into index comparisons or manually setting and modifying flags.

Re: Sylph: the programming language I want

#75
post #69

The lang I want would be mixture of C, C++, Go, Rust, Julia, JavaScript 6, PHP 7, Swift, Lua. * Optional typing (like PHP7/Hack/ES7) * support for compilation (statically linked native binaries) and JIT (like Visual Basic 6 with its P-Code) * memory safety (no null/dangling pointers like Rust) * procedural & object oriented & functional style (like JavaScript/PHP/C++) * modern base standard library / API (like C/Go/J…

"modern base API", what does that mean?

I meant "language standard library" (I updated the text).

C/C++/Object-C/PHP have short functions with names like strlen, strstr, etc. Java/C#/JavaScript have .length() and things like System.out.println()/Console.Write(). Ideally, I would like a middle ground. The Java/C# standard library is too verbose and the C standard functions are a bit cryptic.

It's great one can use different programming styles in JavaScript/PHP/C++. In PHP many functions are available in procedural and object oriented style, e.g. http://php.net/manual/en/mysqli.query.php

Re: Sylph: the programming language I want

#76
post #69

The lang I want would be mixture of C, C++, Go, Rust, Julia, JavaScript 6, PHP 7, Swift, Lua. * Optional typing (like PHP7/Hack/ES7) * support for compilation (statically linked native binaries) and JIT (like Visual Basic 6 with its P-Code) * memory safety (no null/dangling pointers like Rust) * procedural & object oriented & functional style (like JavaScript/PHP/C++) * modern base standard library / API (like C/Go/J…

The language closest to what you have described I believe is Dart, but it does have a VM.

Re: Sylph: the programming language I want

#77

A lot of syntax / spacing / etc. problems would go away if we stopped using completely plain text as the medium for programming languages. Or rather, if we extended plain text, or got our editors to understand the languages a bit more thoroughly than just highlighting keywords and giving us autocompletion or whatever. This has been explored a bit by michaelw and others ( http://www.foldr.org/~michaelw/emacs/ ) for li…

I made a start on it http://sediment.io

There's a pretty exhausting amount of work to get to the same toolset we have for text-based languages though.

Re: Sylph: the programming language I want

#78

Earlier quoted context omitted.

It actually reminds me of a first draft mind dump. From here, some aggressive refactoring could turn this into a very nice language specification. Brain-dumps are valuable for discussion and as a first step. From there, we just need to follow our normal programming routines: Write, refactor, test, repeat.

I hated sounding negative on the article. It represents a lot of admirable effort. My point is that the effort is not directed in a particularly constructive direction in regard to creating a new programming language. There's a clear goal when writing a language that is both a floor wax and a desert topping. On the other hand, all writing a language with the goal of being neither floor wax nor desert topping just get…

Brainstorming is not a structured exercise, it's a bunch of people throwing ideas. How productive it was is not measured by constraints.

Re: Sylph: the programming language I want

#79
post #51

Earlier quoted context omitted.

Note that the interface between the machine and the human is one of the slowest. Being able to learn things about numbers, or about code, without touching the keyboard / mouse is important.

Well have the machine annotate the code then.

What the machine annotates and what the programmer wants to read are two very different things, for we often condense some long, confusing type signatures into things we can talk about - for example, a lens.

    type Lens s t a b = forall f. Functor f => (a -> f b) -> s -> f t 
If we want to compose several of these, for example, with our regular function composition operator, then we check the resulting type - it's not what you really want to see.

    fun l1 l2 = l1 . l2
    :t fun
The signature given is less than helpful - if you manage to parse it you'll probably have forgot what you were tying to do next. When all we really wanted was a signature like

    Lens' b y -> Lens' a b -> Lens' a y
Making the machine pick the "right" representation is probably a futile task - there could be any number of ambiguous representations of the same type, but the only meaningful one is the one the original programmer intended.

Re: Sylph: the programming language I want

#80

Earlier quoted context omitted.

I hated sounding negative on the article. It represents a lot of admirable effort. My point is that the effort is not directed in a particularly constructive direction in regard to creating a new programming language. There's a clear goal when writing a language that is both a floor wax and a desert topping. On the other hand, all writing a language with the goal of being neither floor wax nor desert topping just get…

Brainstorming is not a structured exercise, it's a bunch of people throwing ideas. How productive it was is not measured by constraints.

One of the structural features of brainstorming is the prohibition on criticism.

Etc.

Post reply on HN