« first day (208 days earlier)      last day (749 days later) » 

12:06 AM
@Downgoat D: D: D:
@Downgoat no we're not, it's going to have sane casts
e.g. anything + string -> anything.toString() + string
@Downgoat func?
@Downgoat iterable + subscript using the same thing = bad
@Downgoat The only bad thing about JS typing is that it's so unexpected
 
12:31 AM
@ASCII-only no i mean if we do user define casting kinda thing
@ASCII-only no not same thing
You can write custom subscript but iterable one gives you one if you want
 
@Downgoat but how is user casting bad
 
@ASCII-only you get js like casting
 
@Downgoat but it will have to iterate through every previous element
 
@ASCII-only oh
 
@Downgoat only if user uses casting like it isn't supposed to be used
 
12:33 AM
how about sequence extends iterable and sequence gives subscript
@ASCII-only no not really. Unless you man cast only happens when explicitly said
 
@Downgoat pls give example of it being bad
 
JavaScript
 
@Downgoat Because and only because the casts gave unexpected results
 
orly
what do you think String::[1,2,3] should give. Stringified version of array right?
what about Number::"123", string converted to number right?
 
@Downgoat Hmm
@Downgoat definitely
 
12:39 AM
ok well JS does all of that
when you do +"1" + 1 it gives 2. Why? because + needs a number, so JS will implicitly cast whatever is there to a number
[]+{}? + needs string or number, so it'll convert the two operands to string representation. [] would become empty string as no elements. {} is stringified version of object
 
@Downgoat {}?.+?
 
look monospace carefully :P
?. is not part of monospace
wait shit stupid grammar
 
@Downgoat why does it need string or number
 
well it doesn't make sense to add objects or arrays
 
@Downgoat [1]+[2]==[1,2]
{foo:1}+{bar:2}=={foo:1,bar:2}
 
12:47 AM
@ASCII-only not really how objects work
make 0 sense because of ID, proto and all
but seriously implicit casts are very bad idea 0/10
 
@Downgoat ?
what does id and proto have to do with result making 0 sense
 
shit can't edit anymore
@ASCII-only because you can't just "merge" objects
arrays are also like objects
just the keys are #s
 
@Downgoat It is not merging object, it is a new object that results from the addition of the other two
 
still you have same problem
It's like having:
class Animal {
    let sound: String = "hello"
}

class Dog: Animal {
    override let sound: String = "woof"
}

class Goat: Animal {
    override let sound: String = "bleet"
}
now if I have Dog() and Goat(), pls tell how to merge or add
 
@Downgoat you don't? because they both do not override +?
 
12:53 AM
sorry I meant if that code was in JS
 
0/10 js uses extends not :
 
it was psuedo code :P
 
@Downgoat wdym, js would commit heresy and give "[object Dog][object Goat]"
 
no like if JS did what you suggested JS should do, what would be output?
@ASCII-only it would still give [object Object] btw
 
@Downgoat error
 
1:01 AM
exactly
that is what it should do
implicit casting would defeat that
 
@Downgoat ... no it wouldn't
 
yes
it would cast everything into string
 
plus we can disable implicit casting by adding explicit like C# does
 
if you can implement implicit casting in sane way you can try
but I am strongly against
 
@Downgoat C# has it i don't see why we shouldn't have it
 
1:05 AM
C# is not VSL
 
@Downgoat C# is a good statically typed language and therefore one we can safely take features from
 
lemme strawpoll
ok seperate topic: arrays should return optional if followed by ?
e.g.:
let array = [1,2,3] then array[3]? would be nil but array[3] without question mark is out of bounds
 
@Downgoat hmm ok
 
1:40 AM
 
@Downgoat 0/10 inconclusive
 
 
17 hours later…
7:02 PM
@ASCII-only pls halp nearly throwing bork
@ASCII-only this code doesn't make sense:
    constructor (array: array, type: number, position: Object) {
        super(position);

        /** @type {string} */
        this.literal = literal;

        /** @type {VSLTokenType} */
        this.type = type;
    }
where is array variable going and where did literal come from
 

« first day (208 days earlier)      last day (749 days later) »