Live data from Hacker News

Using Haskell to Find Unused Spring MVC Code

tech.small-improvements.com

21–24 of 24 posts

Re: Using Haskell to Find Unused Spring MVC Code

#22
post #20

Earlier quoted context omitted.

Lazy/strict is just one property that can be problematic in a high performance context. The biggest one to me is mutability. Basically it's a simple test: Can I swap pointers? (e.g. 'model_current' and 'model_next_timestep'). If not, I can't use it, it would slow down numerical solvers tremendously to allocate and free the required memory for each step. However, if I can just have the time iteration in an imperative…

Pointer swapping would probably just be swapping the arguments to your loop function.

Well one needs to become the output, so if you only have immutable data structures it's afaik impossible.

Re: Using Haskell to Find Unused Spring MVC Code

#23

> Putting too many functions that are relatively complex in the where clause is a bad idea, because you lose the explicit type signature… Note that it’s possible to give type signatures for definitions in “where” clauses: twice :: Int -> Int twice x = two * x where two :: Int two = 2 However, you may need the ScopedTypeVariables extension[1] in order to be able to express the correct type signature. (This extension w…

>The biggest real problem I’ve found with large “where” clauses is that they tend to have a lot of implicit dependencies on variables from the enclosing scope. For me it's always a toss up. I like to make things local where possible to give some indication that the definitions need not be looked over with a fine-toothed comb -- they aren't used extensively. On the other hand, it does often lead to implicit dependenci…

Dr Racket has a nice feature where it draws arrows between a variable and its binding site, and between a binding and its use sites; it would be nice to use a similar thing in Haskell.

https://docs.racket-lang.org/drracket/buttons.html#%28idx._%...

Re: Using Haskell to Find Unused Spring MVC Code

#24

Earlier quoted context omitted.

>The biggest real problem I’ve found with large “where” clauses is that they tend to have a lot of implicit dependencies on variables from the enclosing scope. For me it's always a toss up. I like to make things local where possible to give some indication that the definitions need not be looked over with a fine-toothed comb -- they aren't used extensively. On the other hand, it does often lead to implicit dependenci…

Dr Racket has a nice feature where it draws arrows between a variable and its binding site, and between a binding and its use sites; it would be nice to use a similar thing in Haskell. https://docs.racket-lang.org/drracket/buttons.html#%28idx._%...

I think something like eclipse's definition window would do a better job.
Post reply on HN