if foo = some_nilablewould be
foo = some_nilable; if foo(or maybe a dedicated assignment operator as @asterite mentioned)
if foo = anythingis not allowed at all. i imagine they may have had a similar discussion in their past)
if foo = nilableinstead of
list-style-type: lower-alphain CSS)
i += 1by
i = i.succmakes it even more generically useful
brew install crystaland with
Tis restricted to be of type
Vec, which is used for both arguments and the return type. How can I do similar with Crystal, without a type alias or relying on the inferred call site types?
proc abs[T: Vec](o: var T, v: T): var T = ...
whereor even overloading
signaturewhere it belongs
definstead of mine just generating the body, and I decided on mine, for a couple reasons. 1) The readability as mentioned. 2) I would like to selectively choose which ones to annotate as always inlined, 3) I would like to add additional logic to some methods.