Skip to content

Latest commit

 

History

History
42 lines (28 loc) · 824 Bytes

README.md

File metadata and controls

42 lines (28 loc) · 824 Bytes

Raffinade

Effort to transform CoffeeScript to prefix language. In order to avoid nested constructions and achieving code elegance.

Example issue and approaches to resolve:

# Issue
# Nested construction, cumbersomity

value = (some_function argument)[key]
# Approach

### Get property ###
gp = (key, obj) -> obj[key]
# Result

value = gp key some_function argument
# CS produce code returns lalest expression, altought some time need not this
# return, therefore this code is redundant. Possible to append undefined in
# last line, but this require one line

some_function = ->
    some_code
    undefined

# Looks better idea use prefix function ala JS void operator

v = -> undefined # Kind of JS void

some_function = -> v some_code