« first day (2573 days earlier)      last day (2376 days later) » 
06:00 - 18:0018:00 - 23:00

6:56 AM
'morning.
 
7:43 AM
Hello blotches.
 
8:11 AM
Morning
 
Hey, MoonOwl. Haven't seen you around lately.
 
Because C# is not the only language I work with
And I'm not working with it at the moment
I have been looking at other things such as Go, Rust and Julia
And reading stuff on language design since my exam is soon
 
I work mostly with TypeScript nowadays. Doesn't mean I can't chat here ;-P
 
I forgot to mention Haskell among the languages
I suppose it's just timezone differences then
I do have to ask: Why is SOAP not used by non-enterprise web services
I want to see if it's worthy of learning
 
It's too convoluted to be used in a greenfield project.
Especially in favor of something like REST over HTTP, it's just way easier.
 
8:19 AM
Fair enough
 
I wouldn't use SOAP if starting out today.
 
Are you guys making use of closures in C#7 BTW
Along with discriminated unions, pattern matching, etc
And tuples
Or the community is rather conservative on adoption
 
Honestly, all those features are more-or-less used in edge cases. If they were more useful in general day-to-day programming, they'd be implemented far sooner. That said, I only really make use of out var because that's just lovely. I haven't had a use case for anything else, really. But that's just one person.
Oh, no, I did use pattern matching once or twice.
 
They are standard features for functional programming languages. Could it be the C# design team trying to provide more language support for functional programming?
The one thing that irritates me about these features is that C# discriminated unions are incompatible with F# ones
 
Most likely. But since it's all Roslyn now, it's not so much the 'design team' as the community support for a particular feature.
 
8:26 AM
I don't use C# 7 yet.
Though my upcoming project will.
 
The only thing we now need is immutable mode
 
@MoonOwl22 That's been the C# team's goals since 2007. C# is a hybrid-paradigm language. Starting with LINQ, it's been all about selectively adopting features from functional programming.
 
You know how in ES you can declare strict mode? I'd like to see language modes in C#
 
Strict mode != immutable
 
I did not make that claim
 
8:28 AM
Good. Strict mode is really not a good example :p
It's a patch for something that always should have been.
 
The C# developer community is general conservative, though a lot less so that the Java community. Not a nad thing.
bad.
 
But what I mean you can choose which subset of C# you'd like to use
It's something I'd want to see in C++ as well
A lot of meta-linguistic abstraction has been about extension rather than extraction, which I'd like to see
If you can have a language mode for C# where you have no inheritance past abstract classes and can only ever implement interfaces
And these language modes can be seen as modules so they are user-defined rather than the norm where anything interesting in terms of messing around with a language tends to be locked down until you have ugly hacks
This way language support is essentially provided for style guides and I think for teams it reduces the strain on code reviews
What are your thoughts?
 
I'd like to see something like that, but it doesn't necessarily have to be in the language itself. Something like that could exist in the form of a linter, and that would be fine when hooked into the output/git commit.
 
8:44 AM
The problem with that is that "C#" ceases to be a language, and becomes a family of languages.
When writing WPF code, you often have a lot of boilerplate code for bindable properties, adding a call to RaisePropertyChanged in a property's setter. There are all sorts of solutions to this boilerplate, from a simple base class method SetProperty which wraps it, to an AOP attribute injecting it, and so on.
One solution that was proposed was to add a new modifier, possibly as a roslyn hook, to add support: public bindable string MyProp {get;set;} and have it as a language extension, rather than a post-compile action like [RaisePropertyChanged] public string MyProp {get;set;}.
The response from the C# team has always been "this shouldn't be part of the language. "
 
@AvnerShahar-Kashtan C#, like C++, already feels like a family of languages organised hierarchically
So not part of the language but could come in the form of a linter as Roel was saying
 
9:29 AM
Morning
someone got a minute to talk about Async and Async with callbacks :)
 
Callbacks? Callbacks in C#? What are you doing?!
 
By "async with callbacks", you mean the .NET 1.0-style APM pattern?
 
hi all
 
I have a Angular App which talks to web api, this web api talks to N numbers of web apis
now some operations will take 30 seconds others will take 30 minutes or hours in extreme cases
I need to make these async, and I am dead confused now
 
Start a task and save that task in a list or dictionary. Let it run. Hook up a continuation to the task to handle the cleanup and notification when its done. End of story.
 
9:35 AM
i have this code to swap between different forms in my windows form app, its a little messy, but it works, the issue is when i add more forms im going to have to make more methods which do exactly the same but with a different form, is there any way i can merge it into one method?
public void ShowMenu()
{
    menuForm.Show();
    employeeListForm.Hide();
}
public void ShowEmployeeList()
{
    menuForm.Hide();
    employeeListForm.Show();
}
 
@AvnerShahar-Kashtan everything is in memory, what if something went wrong
will need to keep state in database
 
You can do that, yes.
 
for long tasks it makes sense but quick tasks too ?
 
Still not sure what callbacks have to do with it.
Really, it depends on the external web services. Are they async? Do they return a job ID and ask you to poll for it? If so, store that job id and poll for it.
Or are they synchronous but slow, and you have to implement the async on your end?
 
@AvnerShahar-Kashtan I am honestly confused with big picture, web api A calling another web api Basync, now if web api A crashes how web Api B going to respond
@AvnerShahar-Kashtan I am designing both ends, I am thinking about async all the way
 
9:38 AM
@WhatsThePoint Hold a list of all forms. Have a ShowForm method that receives the form to show. Go over the list, setting Visible = true if it's the parameter given, and Visible = false otherwise.
 
i literally thought of that as i sent the message @AvnerShahar-Kashtan :D
 
@Mathematics Callbacks aren't a realistic pattern to use between different services. What you'd usually use for long-running operations is a job pattern. Call a service like SearchAsync which starts an async job on the web-service and returns a job identifier. Expose QueryJobState and GetJobResults endpoints which allow you to poll the state of the job.
 
@AvnerShahar-Kashtan Thank you, now I have something specific to search on google "job pattern" :D
 
Now - and this is the tricky part - write a TaskCompletionSource on your end that encapsulates the polling and GetResults. That way you can just start a new task and have it complete when teh async job is complete, even though it's actually comprised of several different API calls.
 
@AvnerShahar-Kashtan is this the best way or can i do it better?
public void ShowForm(Form formToShow)
{
    foreach (Form form in myForms)
        form.Hide();
    formToShow.Show();
}
 
9:41 AM
@AvnerShahar-Kashtan Thanks going to try to absorb this information
 
@WhatsThePoint The better way is to not do this sort of manual window management, but that's a problem that requires taking a step back and thinking of your UI handling.
 
what is the best way then? still learning the tricks of the trade here
 
things in red are my additions
 
can someone help me?
im becoming mentally disabled because of .net xml stuff
 
9:47 AM
@Wietlol writing or reading?
 
both
 
xml linq?
 
@AvnerShahar-Kashtan do you mean something like this
https://docs.microsoft.com/en-us/aspnet/aspnet/overview/developing-apps-with-windows-azure/building-real-world-cloud-apps-with-windows-azure/queue-centric-work-pattern
 
serialization
I use asp.net web api
and it automatically serializes/deserializes the output/input of the web requests
with json, there is no issue
but with xml, it requires the namespaces
consider the following xml: paste.ofcode.org/d6tcLkaRWXxxL6RPe3QYK6
without the namespace, it just returns null so the input of the method is also null
I can provide the framework with a different serializer
but that comes with even more problems
for each object, I must specify the serializer
on the internet, I found a few threads about how to serialize/deserialize without the namespaces, but they all came with "you must provide an empty collection of namespaces"
and the serialize call is done internally in asp.net web api
so, I cannot do that
so, I thought, maybe I can override the XmlSerializer and override the call without the namespaces
but nope, the methods are all non-virtual
 
@Mathematics That looks like a very specific implementation for azure.
 
9:55 AM
(i blame C#)
 
@Wietlol The namespace isn't optional.
It's not just a nice little label to add to an XML document.
 
why?
 
The namespace is a part of the full name of the elements and attributes in the XML doc.
 
it shouldnt require the namespace
 
Just like the class "String" is ambiguous in C#, and the full name is "System.String" - the namespace isn't optional, it's just often implicit.
 
9:57 AM
but the namespace is always the same
and I can do the serialization without the namespaces
better yet, I do it when calling external rest services
 
If the namespace is always the same it's often implicit and you don't have to define it, but it's still there.
 
if I dont define it, the application just returns nulls
that is how I serialize my own stuff
if I remove the emptyNamespaces part, the xml requires the namespaces to be deserialized and adds them when serializing
but with it, it doesnt
so, it doesnt require the namespaces
how do I get it removed from the internal calls in the framework?
the biggest issue I have is that the framework requires an instance of XmlSerializer
and not an interface
and XmlSerializer is not allowing any overrides
i'd say 8 out of 10 points of being rubbish
 
10:26 AM
Form showForm = myForms.Find(x => x.Name == formToShow); this line returns a null reference exception saying x was null do you have any ideas?
 
myForms contains a null?
 
no, myforms holds a list of my forms
 
21
Q: Long running REST API with queues

user2079172We are implementing a REST API, which will kick off multiple long running backend tasks. I have been reading the RESTful Web Services Cookbook and the recommendation is to return HTTP 202 / Accepted with a Content-Location header pointing to the task being processed. (e.g. http://www.example.org/...

@AvnerShahar-Kashtan just for information, I have this scenario in addition to short running tasks :)
 
Using the TaskCompletionSource technique, you can have both calls to long-running and short-term operations behave the same - as Tasks that can be awaited/continued. That way you don't have to care how it's implemented.
 
I will be honest I don't know what it means, but now I am going to search it first ;)
 
11:33 AM
g'day
 
11:46 AM
afternon
@AvnerShahar-Kashtan is this approach going to be using database
 
No, it's a technique for wrapping asynchronous calls, doesn't deal with persistence at all.
I googled a bit and couldn't find a good description of it. I think I'll reawaken my blog and write it out.
I am apparently going to have some free time next week, since we haven't actually received the actual SOW from the client for the new project.
 
thank you, but I think I am struggling with big picture then concrete implementation :(
@AvnerShahar-Kashtan would it work with this scenario
2 hours ago, by Mathematics
user image
 
12:02 PM
The very vaguely defined technique I'm referring to can be used in that scenario, too, yes.
 
 
1 hour later…
1:30 PM
It seems my self-hosted OWIN WebApi site is smarter than I am.
I can set two concurrent processes on the same port, if they use different IP addresses (presumably under different network interfaces).
I am surprised.
 
1:56 PM
if i hide a form, will its load event get called when its shown again? or would i have to change the event to onshow?
 
2:15 PM
Would it be fair to say that because the c# compiler is written in c#, and that compiler is open source, it is possible to read and manipulate c# code like regular objects?
You can use c# to manipulate c# like c# manipulates other objects.
 
c# compiler is written in c#... that's like saying an egg laid an egg
 
No it isn't.
 
why you said it is then
 
Self-hosting is the use of a computer program as part of the toolchain or operating system that produces new versions of that same program—for example, a compiler that can compile its own source code. Self-hosting software is commonplace on personal computers and larger systems. Other programs that are typically self-hosting include kernels, assemblers, command-line interpreters and revision control software. If a system is so new that no software has been written for it, then software is developed on another self-hosting system, often using a cross compiler, and placed on a storage device that...
149
Q: Writing a compiler in its own language

DónalIntuitively, it would seems that a compiler for language Foo cannot itself be written in Foo. More specifically, the first compiler for language Foo cannot be written in Foo, but any subsequent compiler could be written for Foo. But is this actually true? I have some very vague recollection of r...

 
@Nathvi You can use Roslyn to generate source code, modify it and issue diagnostics, through C#
 
2:19 PM
Generating source code is one thing you can do with it.
 
This is called "bootstrapping". You must first build a compiler (or interpreter) for your language in some other language (usually Java or C)...

QUOTED FROM your link :)
@Nathvi did you ever read about tt files if that's what you are after
 
@Mathematics You write a C# compiler in C#, and a C# compiler in a different language which already has a compiler
 
@milleniumbug that answers says it all and that's my point :)
 
You have to use a non C# language to be the compiler first. That doesn't exclude future version of the language being self hosting. Not sure what you're parading around about.
 
you write a C# compiler in a different language
 
2:21 PM
then you compile your C# compiler in a different language with that compiler, you get a compiled compiler, and then with that compiled C# compiler, you compile the C# compiler written in C#, which then you can use to compile the C# compiler written in C#
 
then, when you are able to compile C#, you then rewrite the compiler in C#
then you compile the C#-compiler-project with the new C#-compiler
 
@Mathematics afterwards, you can simply throw that "C# compiler written in a different language" to the trash because you don't need it anymore
also, you don't need to actually have a compiler in a different language there
you could start with a sequence of compilers written in C#, each one which has more understanding of C#
but each previous one is simpler
then the first one you translate manually
 
@milleniumbug you first have to be able to compile the language before you can write something in it and run it
 
@Nathvi No.
 
@AvnerShahar-Kashtan I am getting closer
 
2:32 PM
@KendallFrey, yes?
throw new NoContextException("wtf?") @KendallFrey
 
@Nathvi Your argument seems to be: 1) The C# compiler is written in C#. 2) The C# compiler is open source. 3) Therefore, C# is homoiconic.
That doesn't work
The best you can do with that is 3) There is at least one open source C# project.
 
I never said that C# is homoiconic.
 
s/icon/erot/
 
@Nathvi felt like you did
 
Homoiconicity means that the AST is the same as the source code. I never claimed that.
 
2:35 PM
The syntactic and semantic elements in Roslyn are C# classes, so you can "manipulate the code" as it was C# objects
 
I don't think homoiconicity was implied.
 
@Nathvi I assumed that's what you meant by "it is possible to read and manipulate c# code like regular objects"
 
Still not sure how #3 is derived from #1 and #2.
 
now, it doesn't of course mean the program can manipulate its own source code or anything to that effect
 
@KendallFrey, that is not what I meant. I just meant that it is possible to manipulate and read c# code like regular objects. You can do that and still not be homoiconic.
 
2:37 PM
@Nathvi You can't say "what I meant by X is X". What did you mean, in terms that I understand?
If you mean that C# code is a string, and C# has a string data type, sure, but what does that have to do with the rest of what you said?
 
You claim that I'm saying the same thing over and over without breaking it down. I'm not sure how to be more clear than "I just meant that it is possible to manipulate and read c# code like regular objects. You can do that and still not be homoiconic."
 
You're not explaining what that really means
C# code is certainly not a CLR object
 
You can represent c# code as a syntax tree object which you can read and manipulate.
 
you can read C# code like you can read an XmlDocument using a System.Xml.XmlDocument
 
@Nathvi That's true, and true of basically every language
 
2:41 PM
except... I can't list any libraries that do that for C# code
 
@Wietlol sure, but you don't need to understand entire C# for that
 
Also doesn't have anything to do with the first half of what you said
 
@milleniumbug true
just hello world is enough
 
Lol ok
 
@Wietlol yep, where my "sequence of more and more advanced compilers" comes from
 
2:43 PM
So representing C# as an object has nothing to do with what I said.
 
maybe the very first one would be so simple you could do the translation manually
 
@Nathvi I assume you were trying to make a coherent point but I have no idea what that point is
 
"everything is an object" is fairly meaningless
 
@KendallFrey, pity, I guess you'll have to flail around in the dark because you can't understand.
 
"stuff has state and operations" yeah, what about it
 
2:45 PM
@Nathvi I asked you questions because I wanted to understand, so it's not like I'm just deciding not to.
 
@KendallFrey, I think you make things too pedantic much of the time and I'm not sure how to further convey what I wanted to communicate.
 
I don't think it's possible to be too accurate
 
I think the point is that "you can manipulate code like objects" is a low barrier to enter because nowadays "everything is an object"
 
Ok. You can manipulate ASTs of c# code.
 
@milleniumbug but its wrong too
 
2:49 PM
if you have an instance of CSharpSyntaxTree, you can read / write new versions of it
 
I think we agree on that
 
Ok here's a question, does Roslyn use the CSharpSyntaxTree when compiling?
 
I would assume so. It would be unusual to suggest it doesn't.
 
So because the compiler gives you access (is open source) to operations and representations of c# code as regular classes, interfaces and such, you are able to interface with c# code as regular classes, interfaces. That's all I was trying to convey.
You get the compiler view of the code rather than just the string view.
 
So when you say "you are able to interface..." it basically means "it is theoretically possible (and practically possible for the compiler) to interface..."
C# in general cannot manipulate a C# AST
 
3:01 PM
What do you mean "in general"
?
 
C# does not have a built-in data type that can be an AST
i.e. it's not homoiconic
 
I never claimed it was homoiconic.
 
Not explicitly, but it's easy to think that's what you meant
 
Ok, well I'm telling you explicitly again that's not what I meant.
 
I know
Just avoid using ambiguous language in general
 
3:05 PM
I'm sorry if you didn't infer my meaning correctly. Not everyone interpreted what I said to mean that c# was homoiconic.
:39841596
 
It's not about what everyone interpreted. I just want to help people avoid confusion.
 
I could see how someone might interpret what I said as saying c# is homoiconic if they didn't have a good grasp of the definition of homoiconic.
 
if i hide a form, will its load event get called when its shown again? or would i have to change the event to onshow?
 
3:19 PM
 
3:36 PM
@KendallFrey Just because a language is self-hosting doesn't mean it's homoiconic. Otherwise, nearly every compiled language we can think of would be homoiconic
 
@MoonOwl22 Correct. That wasn't my argument.
 
Sorry wrong target
It was meant for Nathvi
 
We've already covered this
 
Sorry only seeing the other messages
Let me delete my message
 
Yeah I have a habit of doing the same thing
 
3:39 PM
Someone asked me if I'm going to be a crypto-overlord because I have economics and computer science on my degree
lol
It's the thinking that falsely implies that a civil engineering or architecture student would become the prince of housing bubbles
Little do they know we are plebs like them
 
Everyone is a pleb, but some plebs are better at hiding it than others.
 
@MoonOwl22 I'll be getting a Business degree along with either using my Dev experience or just getting a Comp. Sci/Engineering degree when I need to.
 
@hilli_micha My degree is an Information Systems degree I mucked around with so I could have a triple major
It initially only had basic economics
I am going to graduate with economics on it
I think it would be nice to be able to work in the financial sector while at least having a clue of what role I'm playing
And also yes to be a crypto-overload
Before I die
 
4:13 PM
There is only one crypto lord
 
I have a LINQ statement in this format: entities.table1.Where(x => condition).Join(entities.table2.Join(entities.table3, k => ..., v => ..., new {...}), x => ..., y => ..., new {...})
Will all the records from table2 and table3 get pulled in before getting filtered out by the condition in the Where function?
 
There is only one crypto overlord... and that is me
private static byte[] Encrypt(string data)
{
    return Convert.FromBase64String(data));
}
 
4:45 PM
I'm working on a data conversion suite. As part of that, I have models for the various sources of data and a model for the destination data. I'd ideally like to implement the conversion via an operator on each of the sources. Is there a way to dynamically call those operator methods when I don't know the source or destination type?
TL;DR is there a good way to implement the .Cast method here?
    internal static void ImportData(string source, string destination)
    {
        var destinationDatabase = new Database<MSSQL>(destination);
        var sourceDatabase = new Database<FoxPro>(source);
        foreach (var typeMapping in sourceDatabase.AvailableDataTypeMappings)
        {
            var sourceData = sourceDatabase.Get(typeMapping.Item1);
            destinationDatabase.Insert(sourceData.Cast(typeMapping.Item2));
        }
    }
typeMapping is (Type, Type).
 
Operators are a compile-time construct in C#, so that won't work.
 
Gotcha, I didn't realize that.
 
In an ideal world you'd be using F#
 
The first solution that comes to mind is a Converter class
Like Convert, but presumably you need to specify the conversions yourself
@MoonOwl22 Haskell :)
 
@MoonOwl22 I agree. I actually started this project in F#, but I couldn't get it to interface with MSSQL in the way I needed it to. You have to know the schema at compile time and that wasn't a viable requirement.
 
4:56 PM
@KendallFrey I'm not yet familiar with Haskell so forgive me
 
Well, seems I have to ask a question at the risk of the first response being "don't use that, use WCF". Playing with Remoting again and I was under the impression that I could have a shared Interface that was registered on the server and the client, and the actual concrete class (proxy) did not have to be shared. From that point I could call methods on this proxy from the server and perform work on the client.
 
@KendallFrey Yeah, I'll probably end up doing that. Either that or make the source models implement something like ICanBeImported with a .Convert method.
Thanks!
 
@MorganThrapp Data transformation is something I find functional programming better suited for tan any other paradigm I can think of
 
@MorganThrapp In that case I think it would just be IConvertible with Convert.ToType or whatever it is
 
@KendallFrey I started down that route, but don't you need to implement conversions for all the reference types to use IConvertible?
@MoonOwl22 You're not wrong, I just can't get F# to play nice with the database. Plus, if I wrote this in F#, not a single other person at {office} would ever be able to understand it.
 
4:59 PM
@MorganThrapp If you're not using a conversion it's fine to throw NotSupported
 
@KendallFrey Sure, but that's a lot of unused code and it feels disingenuous to claim that I implement IConvertible if only one conversion works.
 
It's something that I started investigating recently: How well F# plays with the rest of the .NET ecosystem.
I find it interesting that F# is still not yet that common
You'd assume that having a functional language for the CLR would mean the world but I suppose you are right
 
The problem is that CLR isn't functional
 
F# is 'practical'
The CLR was designed for C# the way the JRE was designed for Java
 
and it can be seen
 
5:05 PM
Type inference is something that I miss from F# though and wish was a part of C#
 
Same for Haskell
Does F# have typeclasses?
 
Nope
 
sucks
:P
 
And I have never seen anything about monads in F# either
But
 
Oh right I guess C#'s lack of features also applies to CLR
and C# can't properly express a monad interface
 
5:21 PM
C# is becoming C++ without C
And it's not doing a good job of it
F# is basically OCaml with a 'better' (according to my lecturer) type system
Kendall, BTW, I arrived at the conclusion that in a language that supports interfaces but does not have generics, generics are not needed. The OOP way of going about abstraction with types would be strictly via interfaces
Mind you I've shut out the duck-typed language world because it's a very different different world
 
what
 
Give one use case for generics that interfaces don't handle
In C# specifically
 
1. type safe containers
2. Ability to pass arguments of types which implement more than one interface
 
@KendallFrey I was going to make a Haskell joke and say "CAN HASKELL DO MONAD HAHA" but I googled it and apparently it can; so I'm thoroughly depressed.
 
@hilli_micha Of course it can. Monads are one of the central features of Haskell.
 
5:31 PM
3. Avoiding boxing
 
@MoonOwl22 operators
 
practically any time when you need to add any restriction on a type
 
@milleniumbug So type constraining? But how is that any different from defining an interface with the given constraint?
 
Before I home grow one, is there an escape mechanism built into C that can encode and then decode line breaks? Like html encoding or otherwise.
 
@Sidney For HTML, I think there's one in ASP.NET
 
5:35 PM
> there an [...] built into C
no
 
augh
 
Assuming you meant C# not C
 
@milleniumbug I'm so ashamed
 
@Sidney C or C#
 
But yes, c#
 
5:36 PM
If you mean string literals, there's nothing for escaping that afaik
 
@MoonOwl22 Interface without usage of generics can restrict on a single type
> I find OOP technically unsound. It attempts to decompose the world in terms of interfaces that vary on a single type. To deal with the real problems you need multisorted algebras - families of interfaces that span multiple types.
 
@milleniumbug OOP is not technically unsound. It's in Java that it is
 
@MoonOwl22 IComparable<T>
 
I am making the claim that T can be empty interface
 
huh?
 
5:41 PM
@MoonOwl22 Let me tell you a dark secret: C++ introduced templates because interface constraints with inheritance are too limited in usability. Java said "oh no these are too complicated, we don't need these". C# copied Java. Afterwards C# was "omg we need generics". Java afterwards was "omg we need generics". See the pattern?
 
How can you say "Foos support comparing themselves to other Foos" without generics?
 
Also OOP can go die in a fire as far as I care
 
@milleniumbug Buh, buh, I need OOP. Functional programming is hard!
 
@KendallFrey The type of the object would be a property of the object
 
Excuse me?
 
5:48 PM
That would become tedious
You are right
It would take too much work to express that and you essentially end up implementing generics
 
@KendallFrey Generics make life easy, but everything that Generics do, had to be done manually before .net 2.0 came into the world ;) We did many heinous and evil things with .net 1.1
 
The same will be said of Haskell in 1000 years
 
wash your mouth out with soap you sob!
 
you mean wash your mouth with SOAP
 
^^
SOAP is still widely used. And it will be for many years to come. many many many. Even when some of us are hiding in the corner, hands on ears, rocking back and forth saying no no no... SOAP will come back to haunt us.
 
5:51 PM
well, you can say a similar thing about COBOL
 
@RyanTernier Were people in Javaland doing the same?
@RyanTernier Didn't you guys also cast back to the Object type and then recast to the specific type you needed?
The non-generic collection namespace being a hallmark of your era
 
sometimes you still need to do a similar thing
 
@MoonOwl22 All the time. It was like Xmas.
ArrayList ftw
 
integerCollection.stream().whatever().something().collect(Collectors.toArray(ne‌​w Integer[0])) // <--- see the new Integer[0] part
 
ArrayList xmas = new ArrayList();
xmas.Add(new object("hi"));
xmas.Add(this);
xmas.Add(new Puppy());
xmas.add(new Contractor(new job("kill someone", 100), DateTime.Now);
 
5:53 PM
Please don't burn my eyes
 
.net 2.0 Generics was an orgasm to .net 1.1 developers.
 
Boxing for life! Down with generics!
 
Partial application would have been nice in C#
 
Partial application?
 
Except you wouldn't have out and ref parameters
 
5:56 PM
You mean partial classes?
 
No
 
partial application doesn't work well with function overloading
 
Partial application
@milleniumbug Why does it not work with function overloading?
In computer science, partial application (or partial function application) refers to the process of fixing a number of arguments to a function, producing another function of smaller arity. Given a function f : ( X × Y × Z ) → N {\displaystyle \scriptstyle f\colon (X\times Y\times Z)\to N} , we might fix (or 'bind') the first argument, producing a function of type partial ...
 
@MoonOwl22 int Foo(string a, string b) / int Foo (string a, char b)
 
int f(int, string); int f(int, string, string); /* ... */ f(42, "abc") // <--- is it partial application or not
also what Kendall says
 
5:58 PM
@milleniumbug Actually I think I've seen that in JS
 
It would require for us to constrain functions to only take one parameter
 
06:00 - 18:0018:00 - 23:00

« first day (2573 days earlier)      last day (2376 days later) »