!xiMNLXQQvmUKVgTwCc:matrix.org

VL-Language

29 Members
language design for VL3 Servers

Load older messages


SenderMessageTime
19 Jul 2021
@velcrome:matrix.orgvelcrome* this has been working with defaulting Records and GetType all along, but this more universal TypeOf is cool16:48:50
@gregsn:matrix.orggregsnhmm16:50:14
@gregsn:matrix.orggregsnnow that I see the implementation of the GetType node16:50:28
@gregsn:matrix.orggregsnimage.png
Download image.png
16:50:31
@gregsn:matrix.orggregsnmaybe we just need one node.16:51:24
@gregsn:matrix.orggregsnI am not sure if it's cool for the user to know of GetType and TypeOf. 16:51:44
@gregsn:matrix.orggregsnWe could make the GetType generic and call TypeOf if the runtime object is null 16:52:07
@velcrome:matrix.orgvelcrome20210719_235219_2220206181805720021.jpg
Download 20210719_235219_2220206181805720021.jpg
16:52:45
@gregsn:matrix.orggregsnso you only need GetType, but you have different ways to use it. Compile time type via annotation or feed an object at runtime and get a runtime type. You can even combine these. If there is no object at runtime, no apple and no banana, we still know it's a fruti at compile time...16:53:22
@gregsn:matrix.orggregsnbut just one patch that handles it all (statically typed to fruit), but when a banana flows you get its type.16:54:08
@velcrome:matrix.orgvelcromeSounds good16:56:14
@velcrome:matrix.orgvelcromeIt has one big advantage: you don't need to implement a TypeOf for users just yet16:57:18
@velcrome:matrix.orgvelcrome* It has one big advantage: you don't need to implement a TypeOf just yet16:57:58
@velcrome:matrix.orgvelcrome* It has one big advantage: you don't need to implement a TypeOf for users just yet16:59:16
@velcrome:matrix.orgvelcromeBut you give a nice window of opportunity for hand-rolled reflections already17:01:21
@gregsn:matrix.orggregsnactually. this would be a breaking change. GetType(null) currently outputs null. So I guess it's better to have the two different nodes that do different things(?)17:17:31
@velcrome:matrix.orgvelcromethat I don't agree with17:27:04
@velcrome:matrix.orgvelcromethere is Hayden, you and me who tried to dabble with reflections (and failed)17:28:16
@velcrome:matrix.orgvelcromeIf GetType suddenly validly outputs even with `Null`, then kudos to us17:29:44
@gregsn:matrix.orggregsnI am not sure of Elementa and Kairos which might use it and some user patches we don't know of17:29:57
@velcrome:matrix.orgvelcrome* If GetType suddenly validly outputs even with `Null`, then kudos to us17:30:18
@gregsn:matrix.orggregsnprobably you are right, but there is some slight chance of breaking a patch17:30:50
@gregsn:matrix.orggregsnimage.png
Download image.png
17:33:23
@gregsn:matrix.orggregsnimage.png
Download image.png
17:34:27
@gregsn:matrix.orggregsnalready found a potentially breaking patch already. it's too hot for now17:34:57
@velcrome:matrix.orgvelcrome
In reply to @gregsn:matrix.org
sent an image.
this thing should vanish without a trace. Whoever used this for real or in production should feel lucky 😜🤞
17:36:08
@gregsn:matrix.orggregsnwell. it's basically an ugly patch that in C# would look like this OurGetType => input?.GetType()17:37:26
@gregsn:matrix.orggregsn

another option would be to

  • keep GetType as is
  • add TypeOf, which does all the magic
  • add TypeOf (CompiletimeType), which doesn't call GetType internally, but only focuses on the compile time type
17:40:20
@gregsn:matrix.orggregsn
In reply to @velcrome:matrix.org
this thing should vanish without a trace. Whoever used this for real or in production should feel lucky 😜🤞
yeah well, I guess at some point we overdid it with the null checks. Just let the node go pink. I guess this was done in order to avoid runtime errors while building up the patch.
17:43:22
@velcrome:matrix.orgvelcromehopefully you'll collect more opinions, but for my vote: Supercharge ´´GetType´´ without deprecation notice, so it can suddenly detect even ´´Null´´. Make sure to log it into the changes though.. 18:52:23

There are no newer messages yet.


Back to Room List