3 ms·
It is not just about the trailing slashes. I wanted to create pretty urls but I couldn't do it in a simple way because the developers thought that in a path ca
by luos 13y ago
It is not just about the trailing slashes.
I wanted to create pretty urls but I couldn't do it in a simple way because the developers thought that in a path can not be optional parts, like:
/article/1/article-slug and /article/1
So they removed a useful feature. And it was in a 2.x -> 2.x+1 release... Yesterday it worked, today not. I was not happy. :)
http://stackoverflow.com/questions/14980952/routes-with-optional-parameter-play-2-1-scala http://stackoverflow.com/questions/14980952/routes-with-opti...
My othern concern with scala, what is mentioned in the article, is the operator usage.
How am I supposed to "invent" this <:< notation for adding headers? (dispatch lib)
`val svc = url(object_url) <:< Map("User-Agent" -> "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)")`
or in squeryl, converting a boolean into a "query boolean":
```
val fls = false
fls.~.?
```
Other than these, I like it. When I am coding in JS or PHP I always praise the scala types/ compile time checks. I am almost afraid of dynamic typing since I tried scala. :)
- spion 13y agoConsider giving TypeScript a try then. It offers optional, structural static typing, that while not nearly as powerful (or sound) as Scala's, is still better than not having it. And the fact that its completely optional means that its easy to get it out of the way when its not possible to express some constructs with it.