This page is not created by, affiliated with, or supported by Slack Technologies, Inc.


I think the clojurescript-site PR can be merged already, without doing a new release


I am reading the part about type inference in I am asking myself, what are the implications in terms of warnings or optimized transpiled code of an expression being inferred as a number? I understand that when an expression e is inferred as a string, then (str e) is simplified into e. Is there a similar use case for numbers?


I don't recall any optimizations existing around numbers, just type checks.


@mfikes Is there a function that emits a warning when it receives a number?


@viebel Are you referring to the kind of warning you get if you say do, (inc "a")?


@mfikes yes


I'd recommend taking a look a the ::ana/numeric meta that is on those macro-functions and tracing how it causes warnings to be emitted.


I think I need the opposite: a function/macro that is not supposed to receive a number


I’d like to illustrate the scenario with f and g, that is mentioned here > In fact, owing to the way the or macro expands, the expression (or (f 1) 17) is now inferred as being simply number. Is there a piece of code that we can show to demonstrate how the transpilation was optimized due to this inference?