sure would be nice to have `^` as a power operator
# getting-started
h
sure would be nice to have
^
as a power operator
s
keep in mind, ^ is xor in C and having that as power could be misleading
e
For C-family of languages,
**
as a power looks better.
👍 2
h
fair enough, so why wouldn't kotlin include **?
i know i can make an infix ``**`` but i dun wanna ;_;
h
they might as well get on introducing
^
for "or" functions too. I know they currently have
and
,
or
,
xor
etc boolean operators, but it seems like a waste to not make use of these free characters :S
like it's strange they don't use
&
and
^
for boolean
and
and
or
when they already use
!
for boolean
not
or they could also use
&&
and
||
for bitwise operators too 🤷‍♂️
h
7 years old 😮
but hey kt-1440
"The main reason why the features you implemented are not in the language yet is that there are many questions about possible better uses of the syntactic elements they employ. There are very few special characters on our keyboards, so we have to be very cautious here. My personal hunch is that | and & have a decent chance of becoming overloadable operators in Kotlin at some point, but it’s less likely for ^, <<, >>, >>>. In any case, to make such decisions we have to finalize a few other bigger features with high syntactic uncertainty: collection literals, some DSL-related features, etc."
s
h
thanks for sharing
reading through the proposed features, i could not want collection literals and collection comprensions harder
oh fuck, and inline classes for units of measurement, though i do really enjoy https://git.tenkiv.org/software/Physikal
i also really support "no comma after any element of a list if it's followed by a new line"
that would be great for constructors
although a lot of these features feel like.... why is this even a question? (e.g. unsigned types, SAM conversions)
nvm, though, 1.3 is bringing quite a few of them, including inline classes, and unsigned ints 😄