Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Voxera113883yI think type inference in F# and Ocaml works like this.
If the object implements all methods and properties of a type it can be used as that type.
Not sure if this is exactly what your thinking on though. -
@Voxera no, it's not.
it's actually maybe probably much better than what i meant, it's a superset of what i meant, and moreover it's what i should have meant, since it's the natural consequence of some core design principles i'm basing the language on... XD -
@p100sch thank you, that second sentence actually made me laugh =D
i mean... yeah, i get what you mean, and i mostly agree, but in the context of many other things in the current world, that sentence is still pretty funny =D -
You may want to have namespacing in the lang tho to avoid possible overlap and confusion, unless you want to force the lang user to deal with it via forced overloading.
-
@100110111
i do have namespacing, these are just random snippets, not even using the proper syntax even for the basic stuff because I haven't really decided on it yet... =D
well... "blocking", to be more precise. since in this language there's not much difference between a block (of code), class, function and namespace.
all are just flavors of blocks.
why? because it seems extremely natural and logical to me, and the separation seems mostly arbitrary to me.
correct me if i'm wrong. -
@100110111
although now that I think about it... yeah, namespace will have to be a slightly more special one, precisely due to how it needs to be divided up amongst multiple files... yeah. -
kraator4113yWhat makes you think that if a class happens to have methods of the same name and signature that this class is this implicitly implementing the interface?
Lookup what homonyms are for just one reason why this is a bad idea. -
@kraator i don't have that assumption
my assumption is that if A class has the same methods, AND it is being provided as a parameter into somewhere where B class is asked for, it's being done for a reason, that reason being that in said context, they are equivalent. -
@Wisecrack
if i decide my language to have it as a feature, i'm gonna call it "wisecracking dragon polymorphism" in your honor -
Yeah it definitely looks like some kind of duck typing.
And because of that, a bad idea.
Speaking as former Objective-C dev. -
@Lensflare thanks.
the idea is still evolving, i'm currently looking into what and how can i snatch from functional languages, so the whole idea of how objects even conceptually are in this language is... back to almost undefined right now =D -
Can we get some "s" property accesors? I get so tired of dot operator.
Something like
"Player's health" instead of "player.health"
1. Trivial change? ✔
2. Neurotic? ✔
3. Gimmicky? ✔
4. Nice change up from boring old property lookup operator? ✔
5. Original? ✔
6. excessively enjoying checkmark sprites?
✔✔✔✔✔ -
Also for language that do a lot of things right from the perspective of us in the unwashed masses. Look up:
V lang.
Nim.
Beef lang
Zig
Brainfuck.
Ok, maybe not that last one. -
@Midnight-shcode hey, you know what they say, if it works, fix it until it's broken!
Edit: btw what are your inspirations or source languages?
What are you using for parsing? Lexington? Compiling? -
@Wisecrack yes, i'm doing that, but in more substantial parts of the language. breaking the type and class system has higher priority.
Related Rants
-
BlueNutterfly16Just an idea. If I remember correctly, Symbian OS was a free, open-source OS, right? How about people start ...
-
Orn-10Douche: So your a programmer ? Me: Yes Douche: Excellent, I have an idea..... Me: No Douche: cmon bro, wee...
-
Hastouki13Just deleted Eclipse, I swear I heard a sigh of relief from my laptop.
Mah noob wannabe language designer side here again...
...Idea: Automatic/implicit interfaces.
1. do you know a language that has (something like) this?
2. good idea or a bad idea? why?
3. thanks :)
question
probably stupid
idea
language design