172 reputation
8
bio website aleksey-bykov.github.io
location Washington, DC
age
visits member for 2 years, 7 months
seen Nov 21 at 12:33

By day I am a C# and JavaScript developer with 10+ years of experience. By night I work on a NLP project using Haskell that I learn along the way.


Nov
18
comment What do I use for a variant in a UML class diagram?
I use TypeScript, F# and Haskell. But the question can be extended to any language that supports algebraic data types
Nov
18
comment What do I use for a variant in a UML class diagram?
which means there should be a special notation in UML reserved for it, just like for a class or an interface, I just wasn't able to find it
Nov
18
comment What do I use for a variant in a UML class diagram?
using a tag and a value is just a design pattern that gives you something that works like a variant, in languages that natively support it there is no need in knowing how a variant is internally implemented, a variant is a first class citizen with its own distinct syntax that cannot be expressed using other constructs like classes, structures, etc
Nov
18
comment What do I use for a variant in a UML class diagram?
@xmojmr, are you asking for an example of a variant? here it is in F# flavor: type Option<'a> = | Some of 'a| None, in haskell flavor: data Maybe a = Nothing | Just a. I am sorry if the notion of a variant is unfamiliar to you. What else is unclear? Do you need an example of a class?
Nov
18
awarded  Commentator
Nov
18
comment What do I use for a variant in a UML class diagram?
Good catch, yes a class diagram (updated)
Nov
18
revised What do I use for a variant in a UML class diagram?
added 19 characters in body; edited title
Nov
18
comment What do I use for a variant in a UML class diagram?
It's going to be such a shame if it doesn't.
Nov
18
revised What do I use for a variant in a UML class diagram?
edited title
Nov
18
asked What do I use for a variant in a UML class diagram?
Oct
19
awarded  Autobiographer
Sep
28
comment Is there a way to define a consistent date in a dependent type language?
@MichaelGrünewald That's an epic text. Thank you!
Sep
28
asked Is there a way to define a consistent date in a dependent type language?
May
6
awarded  Critic
Nov
13
comment What Functional features are worth a little OOP confusion for the benefits they bring?
What really bothers me in C# now is that I cannot use delegates instead of one-method interfaces for 2 simple reasons: 1. you cannot make recursive lambas without a hack (assigning to null first and then to a lambda second) or a Y-combinator (which is as ugly as hell in C#). 2. there are no type aliases that you can use in a project scope, so the signatures of your delegates pretty quickly become unmanageable. So just for these 2 stupid reasons I cannot enjoy C# anymore, because the only thing I can make it work is by using one-method interfaces which is just unnecessary extra work.
Nov
13
comment What Functional features are worth a little OOP confusion for the benefits they bring?
@SK-logic, I like your methaphor
Nov
13
awarded  Student
Nov
13
asked What Functional features are worth a little OOP confusion for the benefits they bring?
Jul
21
asked Best data structure for representing English verb forms
Mar
27
awarded  Custodian