« first day (489 days earlier)      last day (48 days later) » 

10:40 PM
So here's a cursed or blessed thought of mine recent times:
Everyone knows that the multiplicative conjunction is essentially a tuple, and that the additive disjunction is essentially a type-tagged union.
The quirk is, I found a familiar description for the additive conjunction. Namely, it's overloading.
The fuss is then, we can overload anything, as long as there aren't multiple declarations for the same type.
So for example, the integer literal 1 can be an overload of an 8-bit unsigned integer, a 64-bit signed integer, a 32-bit floating point, and many more as desired.
Another, crazier example is to have functions overloaded when they differ only in return types.
The craziness doesn't stop there. For consider a function with type signature Integer & String -> Bool. Such function shall accept only arguments that is overloaded as an integer and a string.
Possibly upcoming question: "My language can overload everything. How should its interactive interpreter query the type of such object?"
10:56 PM
@DannyuNDos Polymorphic literals are not exactly unheard of
Yeah
Especially when I code in Haskell.
Rust go brr
also Java
Does Rust do this? How would you express Integer & (String & Char -> Integer)?
not in that way
but 1 can be a u32, or an i8, etc
Yeah, of course; still, that's just a literal.
11:02 PM
i forgot if it can extend to floating point types too
@DannyuNDos from what i gathered of chat.stackexchange.com/transcript/message/66311240#66311240 thats what u intend?
Not only that.
For example, my langauge would do this:
foo :: Integer
foo = 1

foo :: String
foo = "1"
I don't think it should do this, but this is a sample demonstration.
This results in foo :: Integer & String.
Another, acceptable syntax would be:
foo :: Integer & String
foo = 1 & "1"
its... both at the same time?
Yeah; overloaded.
Waiting to be decided which when needed.
so if i have foo = 2 & "1" then foo + 1 == 3 but foo + "1" == "11"?
Yeah
If + is overloaded as such.
11:08 PM
ok thats really weird
@DannyuNDos assume it has overloads (Int, Int) -> Int and (String, String) -> String
Yeah, of course.
ok thats a real weird language u have there
@Seggan After all, my language is named Cockatrice; it's a monster, and try not to get petrified. Do you want your possessions identified?
Shield & Gun
what if i do Int & Int?
Then it's compile error.
11:12 PM
choose a random one at runtime
random :: () -> Int & Int & Int & Int & Int
Actually, it's with open "/dev/<path-for-RNG>":.
On Linux, of course;
I dunno Windows, so

« first day (489 days earlier)      last day (48 days later) »