14 ms·
Recently I got to use some C# on Linux (with Mono framework), and I gotta say it wasn't bad. I didn't do anything with GUI elements, was all back-end server cod
by rdtsc 12y ago
Recently I got to use some C# on Linux (with Mono framework), and I gotta say it wasn't bad. I didn't do anything with GUI elements, was all back-end server code.
C# wouldn't be my top "go to" language, but I would put it above Java. I liked some of the generics handling better, it can be less verbose it seems.
Monodevelop is not on par with Visual Studio, but it is solid and worked well for me. I usually don't like IDEs, but for a new language/framework and large projects it was very helpful to have it.
Wondering if open sourcing .NET core will breathe a new life into Mono project and maybe it is going to be bigger thing that what we expected -- we'll start seeing more back-end usage of .NET.
F# is nice too, and if anyone stayed away because of having to use Windows, maybe now is a time to take a second look.
- untog 12y agoI used to work in C# (now mostly live in JavaScript land) and I miss things like LINQ a lot. So here's hoping we see wider adoption of C# in the future.
- troycarlson 12y agoI spend most of my time in C# and it's always a sad moment when I start typing .Where(x => ...) in another language and realize it doesn't exist.
- frou_dh 12y agoIt's spelled filter http://en.wikipedia.org/wiki/Filter_%28higher-order_function%29 http://en.wikipedia.org/wiki/Filter_%28higher-order_function...
- untog 12y agoI don't mind C# not using that name because .Where doesn't actually filter the object, it returns an IQueryable, which you can chain further statements onto, then filter.
- DennisP 12y agoThat's basically what filter does in Clojure (and probably any other language with lazy evaluation): http://debasishg.blogspot.com/2010/05/laziness-in-clojure-some-thoughts.html http://debasishg.blogspot.com/2010/05/laziness-in-clojure-so...
- _random_ 12y agoNah, it's spelled Select: http://www.w3schools.com/sql/sql_where.asp http://www.w3schools.com/sql/sql_where.asp (but academics like non-human-friendly terms, sure)
- frou_dh 12y agoNo idea what point you're trying to make. On human-friendliness, filter can read as a physical metaphor, so scores rather well. Just need to remember whether what's caught is kept or discarded.
- seanmcdirmid 12y agoNo. Select == Map Where == Filter SelectMany == FlatMap Aggregate == FoldL
- taco_emoji 12y agoNot sure why this is getting downvoted, that's what it's called in most other languages.
- antics 12y agoThe LINQ API is modeled after relational algebra (where `Select` acts as projection, and `Where` acts as selection, etc.), which is as good a basis for operations on collections as anything. It is not even clear that other popular names have precedent, let alone especially useful expressive power beyond what normal relational algebras afford. Besides that, one of the early intents behind LINQ was to allow a language-integrated ORM, so LINQ's choices for names are actually extremely appropriate.
- frou_dh 12y agoThe comment replied to was about missing its like in other languages. Didn't mean to imply that its name should be changed in C#.
- dingleberry1j 12y agoEven c++ has lambdas now... what's the big deal again?
- emodendroket 12y agoIt's pretty trivial to implement Linq-like functions in JavaScript, or, I think stuff like undersocre has them.
- untog 12y agoIt is and it isn't. LINQ is actually incredibly smart under the hood, so if I ran: myList.Where(x => x.name = 'Person'); .Where(x => x.age > 18); .ToList(); it wouldn't actually run two different array filters - it would combine them. You can imagine the performance gains to be had there.
- emodendroket 12y agoWell, underscore offers this, from the docs: _.where(listOfPlays, {author: "Shakespeare", year: 1611});
- mynameisvlad 12y agoThat's not the same, though; that's you purposefully combining your query (which you can do in LINQ). LINQ doesn't just combine Wheres. It tries to optimize your query as much as possible and executes lazily, so you aren't actually doing any work until you try to use the resultset (in a ToList, for example).
- Todd 12y agoYes. IQueryable actually implements an expression tree, which means that it may never be executed, at least directly. LINQ to Entities (Entity Framework) actually evaluates the expression tree to build SQL statements, then runs those and returns the results (after coercion back to the mapped POCO object).
- emodendroket 12y agoRight. Actually Linq to SQL did the same thing, but a big philosophical difference is Entity will reject stuff that it can't resolve from the database instead of just letting you do whatever (which may involve multiple queries).
- rjbwork 12y agoI'm primarily a C# guy, but whenever I touch JS, i find Underscore indispensable.
- rjblackman 12y agoperhaps these two projects would interest you? https://linqjs.codeplex.com/ https://linqjs.codeplex.com/ http://underscorejs.org/ http://underscorejs.org/
- schrodinger 12y agoJust out of curiosity, what is your go-to language? C# is probably my favorite general purpose language so far, although I really prefer Golang's goroutines/channels over C#'s async model. Curious to hear other perspectives!
- rdtsc 12y agoPython for smaller self-contained projects and scripting. Erlang/Elixir for larger projects where fault tolerance or concurrency is needed. C/C++ where GC is a no-go (games, low latency, time critical data processing). Next up in the pipeline to learn and use: Rust
- _random_ 12y ago> games Ever played something like e.g. Bastion? http://en.wikipedia.org/wiki/Bastion_%28video_game%29 http://en.wikipedia.org/wiki/Bastion_%28video_game%29 I mean if you are developing the new Unreal Engine - sure. But otherwise gaming industry would benefit from more of maintainable code.
- desdiv 12y agoFor context, Bastion was written in C#. Here's what the lead developer said on the topic of GC: http://www.reddit.com/r/IAmA/comments/lwljh/iama_dev_team_of_bastion_the_action_rpg_where_an/c2w5z7u http://www.reddit.com/r/IAmA/comments/lwljh/iama_dev_team_of...
- pjmlp 12y agoThis is more appropriate http://www.reddit.com/r/IAmA/comments/lwljh/iama_dev_team_of_bastion_the_action_rpg_where_an/c2w6z3c http://www.reddit.com/r/IAmA/comments/lwljh/iama_dev_team_of...
- CmonDev 12y agoIt's simple: when looping either make stuff quick to collect or make it never collect.
- edgyswingset 12y ago> I liked some of the generics handling better, it can be less verbose it seems. It pays off in spades in a lot of situations, but the biggest I've noticed is Android development. Hitting a network from a button press in Xamarin is as simple as: button.OnClick += async { var data = HitTheNetworkForSomeData(); // Note that since this is still async, // you may want to set a global or have a // different approach to handling data than // "standard" Android development. DoSomethingWithTheData(data); } In native Android, it usually looked like this: button.SetOnClickListener(new OnClickListener() { new HitTheNetworkTask(this, this).execute() }); @Override public void onNetworkTaskDataRecieved(String data) { doSomething(data); } public class HitTheNetworkTask extends AsyncTask<Void, Void, String> { Context mContext; NetworkDataTaskCallbacks mCallbacks; public HitTheNetworkTask(Context context, NetworkDataTaskCallbacks callbacks) { mContext = context; mCallBacks = callbacks; } @Override public String doInBackGround(Void... voids){ // I'm not pulling your leg here return doTheNetworkTask(); } @Override public void onPostExecute(String data) { callbacks.onNetworkTaskDataRecieved(data); } } It's downright frustrating having to use Java once you're used to C# and .NET.
- bad_user 12y agoYou don't need to use Java for Android or for the JVM, you can just use Scala. See Scaloid [1] for setting up Scala for Android and Scala Async [2] to get that nice "async" syntax you've mentioned. [1] https://github.com/pocorall/scaloid https://github.com/pocorall/scaloid [2] https://github.com/scala/async https://github.com/scala/async
- UK-AL 12y ago"we'll start seeing more back-end usage of .NET." Outside of startup world, it is already used everywhere.
- rdtsc 12y agoOn Linux though?
- SSLy 12y agoWell, I can assure you that Java is used.. more everywhere.
- jammycakes 12y agoFrom itjobswatch.co.uk: C# - 16748 jobs [1]; Java - 13816 jobs [2] [1] http://www.itjobswatch.co.uk/jobs/uk/csharp.do http://www.itjobswatch.co.uk/jobs/uk/csharp.do [2] http://www.itjobswatch.co.uk/jobs/uk/java.do http://www.itjobswatch.co.uk/jobs/uk/java.do
- _random_ 12y agoHe meant like COBOL - wider historical spread (despite declining workforce).
- integraton 12y agoPlaying along with the exercise (by temporarily ignoring everything else that indicates the Java is far more popular than C#) and just using your job site approach, it seems that the UK is pretty different from the US. Looking at US job search sites, Java has about 2 times as many results as C# in the US overall, and 3-6 times as many in SF and New York. Java even has almost twice as many results in Seattle. From indeed.com: Java - 81,818 [1]; C# - 35,623 [2]; [1] http://www.indeed.com/jobs?q=java&l= http://www.indeed.com/jobs?q=java&l= [2] http://www.indeed.com/jobs?q=C%23&l= http://www.indeed.com/jobs?q=C%23&l= comments: - Java has more results than even ".NET", which encompasses more than just C#: 73,971 http://www.indeed.com/jobs?q=.NET&l= http://www.indeed.com/jobs?q=.NET&l= - C# has about the same number of results as Python: 35,072 http://www.indeed.com/jobs?q=python&l= http://www.indeed.com/jobs?q=python&l= From StackOverflow: Java - 794 [1]; C# - 479 [2] [1] http://careers.stackoverflow.com/jobs?searchTerm=java http://careers.stackoverflow.com/jobs?searchTerm=java [2] http://careers.stackoverflow.com/jobs?searchTerm=C%23 http://careers.stackoverflow.com/jobs?searchTerm=C%23 From indeed.co.uk (the only one that has a similar ratio as itjobswatch.co.uk): Java - 25,478 [1]; C# - 28,037 [2] [1] http://www.indeed.co.uk/jobs?q=java&l= http://www.indeed.co.uk/jobs?q=java&l= [2] http://www.indeed.co.uk/jobs?q=C%23&l= http://www.indeed.co.uk/jobs?q=C%23&l= From indeed.com, Bay Area: Java - 5,997 [1]; C# - 1,013 [2] [1] http://www.indeed.com/jobs?q=java&l=San+Francisco%2C+CA&radius=25 http://www.indeed.com/jobs?q=java&l=San+Francisco%2C+CA&radi... [2] http://www.indeed.com/jobs?q=C%23&l=San+Francisco%2C+CA&radius=25 http://www.indeed.com/jobs?q=C%23&l=San+Francisco%2C+CA&radi... From indeed.com, New York: Java - 6,941 [1]; C# - 2,548 [2] [1] http://www.indeed.com/jobs?q=java&l=New+York%2C+NY&radius=25 http://www.indeed.com/jobs?q=java&l=New+York%2C+NY&radius=25 [2] hhttp://www.indeed.com/jobs?q=C%23&l=New+York%2C+NY&radius=25 http://www.indeed.com/jobs?q=C%23&l=New+York%2C+NY&radius=25 From indeed.com, Seattle: Java - 3,832 [1]; C# - 2,124 [2] [1] http://www.indeed.com/jobs?q=java&l=Seattle%2C+WA http://www.indeed.com/jobs?q=java&l=Seattle%2C+WA [2] http://www.indeed.com/jobs?q=C%23&l=Seattle%2C+WA http://www.indeed.com/jobs?q=C%23&l=Seattle%2C+WA
- tejinderss 12y agoI am python developer, I am looking forward to program in F#. F# just seems right after developing with python unlike languages like c#, java.
- _random_ 12y agoPlus if you run - it works.
- CodeCube 12y agoYes! <3 F# :)
- ghuntley 12y agoF# is a pure joy to work with. If your interested in learning it, getting involved or just staying up to date with the news then subscribe to this blog @ https://sergeytihon.wordpress.com/tag/newsf-weekly/ https://sergeytihon.wordpress.com/tag/newsf-weekly/
- gagege 12y agoI'd say Python is more like C# and Java than it is like F#. If you've never used F# (or Haskell, or something else like them) you're in for a surprise.