Live data from Hacker News

Sylph: the programming language I want

eev.ee

91–100 of 119 posts

Re: Sylph: the programming language I want

#91
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…

Other than IDE plugins for other IDE's, I think Racket has most of this covered.

I don't however think that's what was desired.

Re: Sylph: the programming language I want

#92
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…

D?

Hadn't it boast itself as a C++ replacement(which pissed off the C++ community=bad rap), I think it would have been a very good candidate. D minus all the unsafe features looks better than Go, IMHO. Go lack of expressiveness forces developers into copy/paste mode.

Re: Sylph: the programming language I want

#93
post #27
post #13

Earlier quoted context omitted.

> The computer is really quite proficient at inferring block structure from indentation, and if you use a modern editor this structure is manipulated rather effortlessly. Nonsense. Try pasting a block of Python into Hacker News and you get something that starts off like this: import os import random def do_something(x): if x: fd = os.open(x) and only gets worse. A language with braces/semicolons has no such problem;…

Just put two spaces before each line ( https://news.ycombinator.com/formatdoc : "Text after a blank line that is indented by two or more spaces is reproduced verbatim. (This is intended for code.)"): import os import random def do_something(x): if x: fd = os.open(x)

Why the downvote?

Re: Sylph: the programming language I want

#94

Earlier quoted context omitted.

> a machine can look at how the arguments are used and make some educated guesses. The big problem is that humans have to do the same. Why? Just get the machine to do it. It's like when you see programmers doing arithmetic in their heads. "You're sitting in front of a glorified calculator!"

> Just get the machine to do it. Exactly. Many people already use IDEs, or programs which provide auto-completion or hinting of the types a function accepts when writing out a function name - the type does not need to be explicitly written for the machine to identify the type of the function.

What types does the following function expect for the arguments a and b, and what type does it return?

What should an IDE tell the user about the types of a and b in the completion popup?

function foo(a, b) { return a + b; }

Re: Sylph: the programming language I want

#95

> it’s sometimes asked why len in Python is a function, rather than a method. The answer is that of course it is a method, called __len__. The real answer is that Python pointedly and deliberately does not reserve any method That's some comical post rationalization. The reason why len is a function is because it was in Python before Python started receiving OO features. As a result, Python is a crazy hodge podge of i…

I always thought this was a weird nod to typeclasses

Re: Sylph: the programming language I want

#96

> it’s sometimes asked why len in Python is a function, rather than a method. The answer is that of course it is a method, called __len__. The real answer is that Python pointedly and deliberately does not reserve any method That's some comical post rationalization. The reason why len is a function is because it was in Python before Python started receiving OO features. As a result, Python is a crazy hodge podge of i…

If you have some evidence to back that up then you'll want to correct http://en.wikipedia.org/wiki/History_of_Python

"In February 1991, Van Rossum published the code (labeled version 0.9.0) to alt.sources. Already present at this stage in development were classes with inheritance, exception handling, functions [...]"

Re: Sylph: the programming language I want

#97
post #94

Earlier quoted context omitted.

> Just get the machine to do it. Exactly. Many people already use IDEs, or programs which provide auto-completion or hinting of the types a function accepts when writing out a function name - the type does not need to be explicitly written for the machine to identify the type of the function.

What types does the following function expect for the arguments a and b, and what type does it return? What should an IDE tell the user about the types of a and b in the completion popup? function foo(a, b) { return a + b; }

In some static languages, the inferred type for a and b could be Numeric, and foo's type could be:

    (Numeric, Numeric) -> Numeric
Which seems good enough to me.

But what if + is also String concatenation? Or any other overloading of "+". Then maybe the type of a and b is Something_that_can_be_+ed. The user can then think "ok, I'll pass a couple of Ints to obtain an Int, or a couple of Strings to obtain a String!". This also seems useful to me.

Re: Sylph: the programming language I want

#98
post #63

Earlier quoted context omitted.

This was tried. It was called APL. http://en.wikipedia.org/wiki/APL_%28programming_language%29 It was very, very clever. It was so clever hardly anyone understood it, and it's (mostly) forgotten. Having said that - I kind of agree. It seems like most languages are attempts to: 1. Create a human-readable text-based representation of symbolic logic. 2. Chunk the symbolic logic in (hopefully) useful ways. 3. Cross-corre…

Interesting that you use the past tense. I am using such a language in the present. And it is working just fine. I have no need for Python but so many people are seemingly trying to coax me to use it. Such is the case for most of the verbose languages. I do not understand all the constant discourse about languages. Personally I prefer to choose something simple and small, and stick to it. To increase convenience when…

What are these terse languages you speak of?

Re: Sylph: the programming language I want

#99
post #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.

Peel 6 has phasers to do exactly this.

Re: Sylph: the programming language I want

#100

Earlier quoted context omitted.

You really have to design your language around it for it to work well. Haskell has a a lot of syntactic craziness in the name of simplicity.

What? Haskell has a base language expressed in terms of braces and semicolons, and a relatively simple set of layout rules defining how the compiler can insert these braces and semicolons automatically.

Right. I meant that Haskell has a whole lot of other weird syntax to consider, that make it hard to read compared to Python. It's use of indentation is not one of the problems.
Post reply on HN