Hi all. This is some feedback from a new user before I forget what it’s like to be a new user.
(I had to break all the URLs below because new users can’t post more than two links!)
I was looking for a statically typed language for web development. I’m sick of dynamically typed languages and everybody here probably understands my frustrations.
I’m also looking for a language where HTML (and hopefully JSON and XML) are DSLs within the language, so they can take advantage of static typing and IDE support.
After some research, I discover:
Purescript looks okay, maybe a bit complicated. I might try it out later. Haskell for the web looks like hard work with experimental compilers so I’ll shelve that for the meanwhile.
Elm advertises really good error messages. I really like that idea. So here I am.
The website, http://www.elm- lang. org/
I want to see a demo of what Elm can do so I know whether it’s any good. My first view of Elm is “No Runtime Exceptions”. That’s not a huge selling point for me. What I want is easy website layout (elm-ui discovered!) and lots of “UI components” to choose from. I was expecting to maybe see a slideshow banner showcasing sites made with Elm (e.g. https:// madewithreactjs .com/ but as a banner), and maybe something like https:// material. angular. io /components/categories.
I’m looking at the front page trying to work out if this language is any good or not. I look at the examples. The first one is “Hello, world”, which is expected. I’m really impressed by the online editor! After that… well, they’re good as some really basic code for beginners, but there’s stuff missing.
The “Forms” example should have all the HTML form elements: buttons, radio buttons, select boxes, textareas. I want to see example code of how to make them all.
There’s no layout demo. I want to see a notification dialog. I want to see a modal window. I want to see a collapsible pane. I want to see a small floating icon that I can click on to do something. I want to see a context menu. I might write some of these demos myself.
So at this stage I’m thinking that if I use Elm, I have to make all this reusable componentry from scratch.
I recommend putting a picture and link to the SPA demo on the front page, and maybe ask some happy customers if you can link to their pretty Elm websites.
Where do I report compiler bugs? Where is Elm’s Git repository and issue tracker? I think these should be there as well.
Following the tutorial
This is a pretty good tutorial! I had a working web app in minutes, which is far more than I could say about a Java Servlet tutorial. I’m loving the online editors!
You need to add “module XXX exposing (…)” to the top of each example before Elm 19 will accept it.
I don’t usually have high expectations of tutorials, and I usually expect them to get somebody to only a rudimentary level of competence with a language. After that, I’d expect to have to rough it by reading technical specs, package documentation, StackOverflow posts, or optionally purchase a book.
By the way, where is the official Elm language reference?
There are a few Elm books out there. I recommend linking to them at the end of the tutorial.
It’s not in the Debian repository!. That means I have to do it the hard way. Well;
npm is already installed so I can just use that.
So I go to the main website… where’s the “Download” or “Install” link!? I remember some info in the guide, and I find a download link in there, but please put this on the front page!
I download it and get… a single executable file. I can’t fault you for keeping your packages small! I guess I can live without configuration files and a man page.
Now, I’m a fan of Microsoft’s Visual Studio code. I understand it’s not the author’s first choice. I spend some time staring at the list of “Elm” plugins, trying to work out which of the 9 options that come up is the currently supported one with a language server. Anyway, after a bit of interaction with
npm and restarting the editor, I have it configured with
elm-test. It works really well. I save, and get a bajillion error messages immediately which is a hundred times better than getting them at runtime.
My next question is… how do you use a debugger? I see the time travel debugger which looks awesome and I haven’t tried yet, but how do you create breakpoints, step through your code and inspect variables the old-fashioned way?
So… no complaints about installation. I mean, it’s a single executable file. There’s very little, literally, to complain about.
What I’m going to do
I want to implement the OData protocol (http:// www. odata .org) and make some UI components for it. This involves:
- Making a URL creater. There’s an ABNF available.
- Lots of XML. There are DTDs available.
- Lots of JSON. There is a JSON schema available.
Last night I got some basic XML stuff working, which is a good start. However, the protocol is huge and I’m hoping there are tools to convert DTDs and schemas into parsers and generators. If not, I guess I’ll be porting them from Haskell or writing them myself?