Scala tooling, compared to C# tooling, are similar to Scala vs. C# itself - there are lots of things Scala does very well, and lots of things IntelliJ, for instance, does very well. But you have to go through a lot of crap that balances out the good parts. C# is at least pretty good in most places, and Visual Studio likewise.
@Neil To be fair, though, you can find a lot of blog posts and SO questions for C# which predate async/await and Tasks, for instance, giving bad advice to newbies.
@Wietlol Yes, yes, you've complained about that before. I agree that having to encode asyncness in the method return call isn't the best solution, but given that in most applications I've written in the last couple of years I wanted all service calls to be async, that ship has sailed.
Now, given that we're working with async methods (Task/ValueTask/IAsyncEnumerable return values), the ability to use async/await and get a coherent logical call flow is invaluable
@Wietlol I'm not talking about writing async/non-async code as concepts. I'm talking about the C# async/await keywords.
Ugh. I have a friend that's living in the US. He was here for a week, went to the airport last night to go back home, and discovered that due to a technicality, his US visa expired and he's stuck here, away from his family.
Yes, but that means inventing new languages every time a new paradigm comes along. I guarantee that if you release Wietlang, you'll suddenly come across a new concept and want to add it to the language, and discover the magical power of backwards compatibility.
@AvnerShahar-Kashtan when an async function gets called (such as doing a web request), the "stack" gets pushed aside and the processor that used that stack starts doing other things (other processes that were queued)
when the response comes, the "stack" is queued up again on the process queue
I'm trying whit this decimal.TryParse(primero, NumberStyles.Any, CultureInfo.CurrentCulture, out p), the culture is en-US and decimal separator "." but when i send "10,5" result is 105
> In programming, a call site of a function or subroutine is the location (line of code) where the function is called (or may be called, through dynamic dispatch).
In programming, a call site of a function or subroutine is the location (line of code) where the function is called (or may be called, through dynamic dispatch). A call site is where zero or more arguments are passed to the function, and zero or more return values are received.
== Example ==
// this is a function definition
function sqr(x)
{
return x * x;
}
function foo() {
// these are two call sites of function sqr in this function
a = sqr(b);
c = sqr(b);
}
== Assembler example ==
IBM/360 or Z/Architecture
* (usually) external call.... R13 usually points to a save area for g...
@FedericoFiaSare That makes sense. When you specify NumberStyles.Any, you're explicitly allowing the Thousands separator as well, which in en-US is the comma.
So "10,5" parses into "105" just like "1,000,000" parses into "1000000"
what's the difference between `SELECT tablename.columnname`, `SELECT tablename.columnname columnname`, and `SELECT tablename.columnname AS [columnname]`?
@Jay in the first, you reference it by the column name, in the second you reference it as the alias that follows, and in the last, same as the second, except you can add characters which you wouldn't normally be able to use
the first one will only force the full name if you have 2 tables in the FROM clause where they both have the same column name. The 2nd and 3rd ones are exactly the same because AS is optional in aliases for major RDBMS, I don't know any that wouldn't know how to parse an alias without AS
when you have 2 tables with the same column, e.g. user.name and product.name is the right naming convention, but if you join those 2 tables you'll end up having full table.column names which you may not want
If your program refers to the name of the exact column, and that changes, you can still make it work by adding an alias, but using an alias with the name of an old column is confusing
sometimes it's simpler to add aliases from the start
otherwise you'll need to modify both the query and the program
@Neil I have to say while that's right, you should almost NEVER change your query to fit your app query, but instead do so the other way around.
The few cases that apply to that are usually a last resort and mostly legacy issues where you change a data source for a legacy app that nobody dares touch
I personally would prefer to avoid editing a query that's already working, even more so because it's easy to encapsulate selections into other selections without even refactoring, and adding aliases afterwards is painful to account for
like if you're doing SELECT name, surname, birth_date FROM person WHERE age BETWEEN 18 AND 24, later down the road someone will tell me "those users you've got there, I need to know what sports club have any of them registered", so instead of re-doing the query I might simply do SELECT name FROM club_registration WHERE id_registered_user IN (SELECT id FROM ( <copy-paste the previous query> ))
Pretty pointless on simple queries, but if the existing one is a monster it makes all the sense.
if it is too much, you probably didnt remove all the work
automatically create new projects ready for deployment automatically deploy projects on commits/merges automatically setup the environment based on the specifications by the project etc
you need to do those things, otherwise you get a real lot of repetitive work
Is any part of Roslyn suitable for full-on code generation or does it only manipulate fragments of a code hierarchy that already exists?
I know of it for refactorings, and it seemed from the announcements that the syntax tree could represent everything, but I haven't seen it in use for big stuff