136 reputation
5
bio website mindplay.dk
location New York, NY
age 39
visits member for 2 years, 5 months
seen Jul 25 at 11:12

Rasmus Schultz (aka mindplay) is a passionate and opinionated web-developer, working since 1998 with PHP, JavaScript, jQuery, HTML5/CSS3/XML, MySQL/MSSQL, ASP.NET, various so-called MVC frameworks and other related technology.

Read articles by me on these sites:


Jul
23
comment does this model-pattern have a name?
@Alex I agree that data-driven programming (and model-driven architecture) is an approach, not a pattern. It still seems like I'm following a pattern though, I mean just at the low level, of every model-type having a meta-type with the same shape - the consumption of that meta-data by helpers and services is an approach, but it seems like following the implementation pattern is what makes that approach practical. Maybe that doesn't make it a pattern, but then I'm not sure what does. (?)
Jul
21
comment does this model-pattern have a name?
@Alex because it's not just data - if it were, you could just as well embed it as annotations and use reflection. So perhaps more accurately "metadata-types", which I guess I just kinda shortened to "meta-types". The bigger question is, is this a known pattern? If it is, it can't be very common - I have never seen it mentioned or described anywhere, and I find that suprising, given how well this actually works in practice.
Jul
16
comment does this model-pattern have a name?
Other terms I've used at times: "co-typing" or "meta-types". I like "type descriptor" best, it bugs me that it refers to a C# language feature, because it accurately describes what this other type is for. Do you know if "type descriptor" means anything in programming in general, or is it just something MS came up with for C#?
Jul
16
comment does this model-pattern have a name?
"Statically-typed Reflection", interesting - except, this isn't reflection, since there is no information derived from the type itself, not even the type-name is used... getType() isn't a factory method, I think the factory-method is UserType::instance()? As for how this compares to working with reflection/annotations in C# - I like this much better, it feels more like "programming" and less like "hacking", since you're leveraging ordinary OO language features and common OOP patterns; reflection/annotations always felt a bit like raping the source code to me ;-)
Oct
21
comment Differences between TypeScript and Dart
For the record, this works var x = {}; x['foo'] = 5; and this does too var y:any = {}; y.foo = 5;, but I was a little surprised to find you're right about this - the perceived type of {} is {} rather than any. Could be a type inference issue. I posted the issue here - we'll see how they respond.
May
9
comment What is the difference between functional relational programming and functional programming?
PS: thank you @axblount, this is an absolutely beautiful answer!
May
9
comment What is the difference between functional relational programming and functional programming?
One very interesting language to take a look at is Opa - a functional language that offers mutable state bound to (relational or document) database-records, very direct query-syntax and an extremely powerful type-system. It's not a functional-relational language per se, but it might be a suitable language in which to exercise the idea of functional-relational programming. (don't be fooled by how this is branded as a "JavaScript framework" - it is a compiled and unique language unlike anything else I've seen.)