derikk:
However, a[:3]
is interpreted as a[3]
. While this is valid code, I don’t believe that anyone would intentionally write this expecting to get a[3]
.
Would it be possible to integrate this syntax into Julia without breaking any existing code or adding too much parse logic?
Note that the a[:x]
syntax would have to work not only for literals like 3
, but general expressions, as it does currently. There you would run into breaking changes as :
currently quotes the expression. Cf
You heard about this brand new exciting programming language called Julia and have some suggestions for how it should work. Wonderful! We’re happy to have you here and help you learn the language and listen to your ideas! However, please be aware that “new” is a relative term. Yes, Julia is newer than, say, C, which was first created in 1972 and standardized in 1989. It is not, however, new in the sense that it is still being freely designed and changed in arbitrary ways. Julia development start…
5 Likes