# Custom Ignore operator override ";"

**URL:** <https://forums.fsharp.org/t/custom-ignore-operator-override/1292>\
**Category:** General\
**Created:** [May 15, 2020, 9:59am UTC](https://forums.fsharp.org/t/custom-ignore-operator-override/1292 "2020-05-15T09:59:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jkone27](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/jkone27/32/735_2.png) [@jkone27](https://forums.fsharp.org/u/jkone27)\
**Post date:** [May 15, 2020, 9:59am UTC](https://forums.fsharp.org/t/custom-ignore-operator-override/1292/1 "2020-05-15T09:59:48Z")

</div>

Hello guys,

when showing F# to C#/js people i always have to explain why we don’t use “;” but instead |\> ignore.

wouldn’t make sense to have a feature to override the “;” OCaml operator (maybe specifying a compiler flag?) . This would make F# come looks much simpler to them!

or as for Custom post-fix op ? - or maybe there is already some related issue?

> <https://github.com/fsharp/fslang-suggestions/issues/711>
>
> Postfix operators
> I propose we allow $ at the start of custom operators, but the operator will be postfix.
> Currently, the $ operator...

Thanks a lot,  
have a great weekend!

---

<div class="post-metadata">

**Author:** ![dlidstrom](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/dlidstrom/32/421_2.png) [@dlidstrom](https://forums.fsharp.org/u/dlidstrom)\
**Post date:** [May 17, 2020, 6:47pm UTC](https://forums.fsharp.org/t/custom-ignore-operator-override/1292/2 "2020-05-17T18:47:01Z")

</div>

I find |\> ignore to be a bit dangerous. It is a compiler workaround to reduce typesafety. I don’t understand why any experienced F# developer would advocate for its usage.

---

<div class="post-metadata">

**Author:** ![Prash](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/prash/32/815_2.png) [@Prash](https://forums.fsharp.org/u/Prash)\
**Post date:** [May 19, 2020, 2:04pm UTC](https://forums.fsharp.org/t/custom-ignore-operator-override/1292/3 "2020-05-19T14:04:46Z")

</div>

It’s good to be explicit that you are ignoring something, because often accidentally ignoring something is the cause of a bug. Semicolon already has a meaning in F# so it would be a bad idea to give it a new additional meaning.

`ignore` can also be dangerous. Imagine you have the code `myFunc a |> ignore`, and then you add a new parameter to `myFunc`. In some parts of the codebase this would cause type errors for you to fix, but in this example there would be no type error and the function would not even run! I have actually seen this happen before and it caused a bug in production. So now I add a type parameter to `ignore` to be even more explicit and safe: `myFunc a |> ignore<int>`.

Rather than trying to hide `ignore` from people, explain to them that it is a valuable thing, especially if used with a type parameter (for curried functions at least, there is less danger after a method call). If your code is using it all the time, it’s probably the sign of a larger problem that can be refactored away. Can you give any specific examples?

---

<div class="post-metadata">

**Author:** ![dlidstrom](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/dlidstrom/32/421_2.png) [@dlidstrom](https://forums.fsharp.org/u/dlidstrom)\
**Post date:** [July 17, 2020, 1:17pm UTC](https://forums.fsharp.org/t/custom-ignore-operator-override/1292/4 "2020-07-17T13:17:49Z")

</div>

Very interesting! I was not aware that ignore can be parameterized. I’ve also seen bugs due to ignore usage that really should have been picked up by the compiler.
