I prefer practical programming language extensions, like the new C++ standard which adds useful things, or Hack which makes PHP useful, or the typed extensions to Javascript and Python.
Advanced programming languages (2009)
141–150 of 208 posts
Re: Advanced programming languages (2009)
#142Earlier quoted context omitted.
Web based is because JSON is always easier with dynamic types. Rapid prototyping is because it requires less explicit up front design due to dynamic types. Artificial Intelligence is because metaprogramming is easier in homoiconic languages.
I'm really intrigued by your last point that "Artificial Intelligence is because metaprogramming is easier in homoiconic languages." Can you elaborate on this? Why are or what about homoiconic lnagunages make them more suitable for metaprogramming and AI in general? Thanks
If what you want is a system that rewrites itself, then you definitely want homoiconicity. It also helps if everything is one big expression.
Let's say you want to write an evolutionary algorithm that rearranges fragments of its code and runs it. More successful functions make it to the new generation. You want LISP for that.
Realistically, you could probably do this on any abstract syntax tree. But the problem is that unless your language is homoiconic, what you get back might not actually be valid in your language. So, homoiconicity gives you bidirectional support for rearranging the AST and still getting something you can read.
It's also just a lot easier to write something that looks at the code and does computation on it when that code is also data.
But, like I said, I'm not sure many people are actually doing this these days. It was popular back in the day. It's not clear that it's the right way to do things.
Re: Advanced programming languages (2009)
#143Earlier quoted context omitted.
Can you explain how types slow you down for whipping up a proof of concept?
Hitting an API endpoint, pulling data out of a database. Areas that already have an implicit schema require you to explicitly redefine that schema within your application. I say this not just from personal preference, but I've proctored many timed coding challenges that were language agnostic. The challenge involved consuming data from a handful of API endpoints and compiling a response. Most statically typed solutio…
Edit: I don't mean this to be snarky, I just feel that it is not a very good experiment to draw conclusions from.
Re: Advanced programming languages (2009)
#144Earlier quoted context omitted.
PL theorists - from what I saw, not being one - prefer the term "unityped". It's not true that there are no (static!) types - there is a single, unnamed type which contains all possible values.
PL theorists who know what they are talking about know that this is false, because the actual diverse types of those values can be reasoned about at compile time. Such a "unityped" program is made up of syntax. We can reason about an expression more deeply than just "it returns a value" and we can do so statically. For instance in Lisp we know more about an expression like (cons 1 2) than that it returns a value. We…
You can of course go further with your static analysis—a language may support many type systems in principle regardless of what the compiler accepts.
Re: Advanced programming languages (2009)
#145What's up with functional languages nowadays? The exists since the dawn of humanity, but they are getting very trendy lately. Is it just my perception? Is it a HN thing? (I've been a reader for just some months)
Re: Advanced programming languages (2009)
#146Earlier quoted context omitted.
Your first two points are also met by optionally typed languages.
I'd argue that optionally typed languages are dynamically typed. Typescript at runtime is dynamically typed, same with Erlang. Perhaps not always true, but usually the type system provides static analysis which is help but not sufficient to provide guarantees.
...the first thing I do when encountering JSON in TypeScript these days is to add type definitions to describe the schema. If I have a hard time describing the schema to TypeScript, I'm going to have an even worse time trying to keep it straight myself.
Re: Advanced programming languages (2009)
#147I can't seriously read an article that promotes Scheme over any other languages. We had a class in university and everybody hated it. How can you write complex program with so many parenthesis?
http://www.paulgraham.com/avg.html
Hacker News itself is written in a new Lisp dialect that resembles Scheme.
https://github.com/arclanguage/anarki/blob/master/lib/news.a...
Re: Advanced programming languages (2009)
#148> It's untyped, which makes it ideal for web-based programming and rapid prototyping. Given its Lisp heritage, Scheme is a natural fit for artificial intelligence. Why does being untyped and having a Lisp heritage make Scheme suitable for these three tasks?
Web based is because JSON is always easier with dynamic types. Rapid prototyping is because it requires less explicit up front design due to dynamic types. Artificial Intelligence is because metaprogramming is easier in homoiconic languages.
Artificial Intelligence is because
metaprogramming is easier in homoiconic
languages.
Homoiconicity is something you can add to any language, dynamically or statically typed, simple or complex, it doesn't matter. It used to be belived that only syntactically simple languages like Lisp are suitable for homoiconic extension, but this myth was destroyed by Walid Taha and his development of the MetaML family of languages.For an overview of how to add homoiconicity to languages, see https://arxiv.org/abs/1602.06568
Re: Advanced programming languages (2009)
#149> Scala is a rugged, expressive, strictly superior replacement for Java. Scala is not replacement for Java. It runs on JVM and can invoke java code, but has completely different approach than Java. Use Kotlin if you want Java replacement. Also I would argue that Scala is much better suited for writing compilers than Haskel.
The problem with this approach is that 90% of Scala libraries are built by people that live in higher-kinded land, and believe that since they have reached that level of expertise, so should everyone else, the second they start learning the language. For instance, look at SummingBird: The hello world example includes F bounded polymorphism, and path dependent types! Anyone new to the language would run away screaming, and I'd not blame them.