5 ms·
For a financial services company they should be using a compiled language. Something like C# or Java or Rust or Go with Postgres.
by DonnyV 3y ago
For a financial services company they should be using a compiled language. Something like C# or Java or Rust or Go with Postgres.
- quaunaut 3y agoWhy? What inherent advantage do those languages have with financial logic?
- notpachet 3y agoBetter static analysis, for one.
- quaunaut 3y agoAnd that helps in financial analysis how?
- notpachet 3y agoI didn't say anything about financial analysis. But static typing is a good defense mechanism against type errors at runtime (I don't think anyone would argue against that). When you're running a financial services product, the cost of a type error in production can be dramatically higher than in non-financial code. Speaking from firsthand experience.
- IshKebab 3y agoI don't think it's specific to financial services. He just meant that financial services is an area where you really don't want bugs! And one of the easiest ways to eliminate entire classes of bugs is to use static typing.
- jakewins 3y agoWe have services in Python and C# at $dayjob, and my experience is that Python has mostly left C# behind here - what is something you can express in the C# type system that MyPy cannot statically check? Conversely, I find myself constrained by C#'s typesystem not having features now widely popular from Rust and Typescript and available in modern Python: const generics / literals, protocols/structural interfaces and matching over algebraic datatypes, to name a few examples.
- neonsunset 3y agoWas bewildered when reading this message. How come? Python and TypeScript by definition don't have a concept of const generics the way it applies to C++ templates or Rust. Nor "matching over algebraic datatypes" made any sense - sure sounds slightly below average fancy but comes down to just using C# pattern matching effectively, which the author may have never done. But then it struck me "structural interfaces sure sounds familiar", I go check the pinned repositories in the github profile and it all made sense immediately - the pinned ones are written in Go, which explains the author's woes with confidently navigating something more sophisticated.
- jakewins 3y agoSorry - can you put the snark aside and answer the question then, it seems given my lack of understanding here as a mere Go simpleton it should be trivial for you. The question I responded to said: "Better static analysis, for one." I asked: "What is something you can express in the C# type system that MyPy cannot statically check?" Can you provide some examples where C#'s type system can express something that modern well-typed Python cannot type-check?
- jakewins 3y ago> Python and TypeScript by definition don't have a concept of const generics the way it applies to C++ templates or Rust. Can you help guide me where I'm misunderstanding the type system aspect of const generics that's missing in Python? What I meant was that in Python I can say something like this: import typing as t class FooEater[NUM_FOOS: int]: def eat_foo(self, num_foos: NUM_FOOS): print("nomnom") one_foo = FooEater[t.Literal[1]]() one_foo.eat_foo(2) # type error, NUM_FOOs for one_foo only allows literal '1' And a PEP695-compatible typechecker will error at build time, saying I can't call `eat_foo` with `2`, because it's constrained to only allow the value `1`. I admit to not being a type system specialist, but at least as I understand Rust's "const generics" the type system feature is: "Things can be generic over constant values". Isn't that the same as what Python supports?
- DonnyV 3y agoPython will let you use float division on integers. Compiled type languages won't do that. This would be solved by using a double data type. But python doesn't have it.
- quaunaut 3y agoYou'd almost certainly just use a library dedicated to mitigating this problem though, of which there are many.
- DonnyV 3y agoOr you could just use a language with a static type system and avoid a whole class of bugs automatically.
- quaunaut 3y agoLook, I like static type systems, but not all type systems are created equal, and some(with the easiest example being Go) are downright awful for helping encode business logic, forcing you to write immense amounts of code just to work around their awful type system decisions, code that often introduces bugs because of those issues.
- Izkata 3y agoYou prooobably don't want to use doubles with financial data. Even in Java. Go for BigDecimal instead, for arbitrary precision instead of floating-point math. And if you're doing that, python has the Decimal class for the same thing.
- artimaeis 3y agoHe's been talking about the problems/solutions around Wave for a while. Every time I can't help but think if they'd just started with C# or Java, maybe Go or Rust, they'd be in a better position. Here's what I see them as providing: - Simple async, no wasted CPU on I/O - Strong typing defaults - Reliable static analysis Half of the "pros" he lists for using GraphQL are just provided out of the box using ASP.NET Core with NSwag to document the endpoints. If they want to keep the client-side composability, create some OData endpoints and you've got it. > Self-documentation of exact return type > Code generation of exact return type leads to safer clients > Our various apps (user app, support app, Wave agent app, etc.) can mostly share one API, reducing complexity > Composable query language allows clients to fetch exactly the data they need in a single packet roundtrip without needing to build a large number of special-purpose endpoints Bias flag: I'm primarily a C#/.NET developer. I came up on python and ruby but have had more success in my region getting paid to work on .NET code.