b6fan
The limitation is mainly that the widgets are limited. For example, comctl32.dll hasn't got new widgets since Windows xp. So depending on your needs, it might fit perfectly, or lack some features and that's going to be painful.
The Pascal language will feel outdated. But you don't have to do everything using it. You can, for example, write the non-UI logic in other languages and then glue them using dynamic libraries.
For web development, HTML, CSS, Javascript can be written directly, or generated by some other template language like haml, slim, coffeescript, sass, stylus, etc.
I believe the same applies to TeX. Although AFAIK there aren't template languages targeting TeX, treating TeX as "dynamic HTML" or just use your favorite language to generate TeX sometimes turns out to be much cleaner and more maintainable code. The generated TeX is not human-read friendly, but just works.
Phabricator uses light colors to show changes not introduced in this patch but a rebase against master [1]. The experience is pretty good if the workflow is to always fast-forward and the patch author does rebase. Changes introduced by other people are in light green and red. Duplicated-line issue can be obviously seen.
[1]: https://secure.phabricator.com/book/phabricator/article/diff...
Therefore I can use coffeescript to describe the component:
{div, p, ul, li} = React.DOM
...
render: ->
div className: 'foo',
p className: 'bar', 'blabla'
p className: 'bar', 'blabla'
ul className: 'somelist',
@state.items.map (x) -> li key: x.id, x.content
If Riot.js uses a custom parser, it may not be able to do this. 1. common (not all) things are simple / elegant.
2. Advanced things are doable, usually require a slightly more complex syntax.
For example, Ruby allows one "block" (anonymous function) per method. Why not 2 or more blocks? Because Matz has studied common lisp (likely, maybe something else) standard library and noticed that in ~97% (maybe not exact number) cases, one anonymous function is enough. But you can use more anonymous functions using a different syntax.And here is the same case. People call methods much more often than to get the method. Therefore Ruby makes it default to call the method, but not stop you from getting the method object. It's just unfair to say Ruby cannot do these things.
Ruby intentionally makes parenthesis optional. So `do_something` is `do_something()`.
For the first example,
- method_as_fun = o.my-method
- method_as_fun(5) # not reached
+ method_as_fun = o.method(:my_method)
+ method_as_fun.call(5) # or method_as_fun[5]
And for the lexical scope thing, def f(x)
g = ->y {x + y}
g[2]
end
f(2)
Or, explicitly use class variables, def f(x)
@x = x
def g(y); @x + y; end
g(2)
end
f(2)Although its functions are a subset of sh for python. It has many synatactic sugars, makes full use of ruby Enumerable, and does lazy-execute.