# Redefining x - y = 0

**URL:** https://discourse.julialang.org/t/redefining-x-y-0/17015
**Category:** General Usage
**Tags:** question
**Created:** [October 31, 2018, 5:10pm UTC](https://discourse.julialang.org/t/redefining-x-y-0/17015 "2018-10-31T17:10:03Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![Stephen\_Vavasis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stephen_vavasis/32/3389_2.png) [@Stephen\_Vavasis](https://discourse.julialang.org/u/Stephen_Vavasis)
#### Post date: [November 1, 2018, 1:25pm UTC](https://discourse.julialang.org/t/redefining-x-y-0/17015/9 "2018-11-01T13:25:40Z")

</div>

First, I want to apologize again. I misquoted the core-devs and simplified a complex issue into an inappropriate and demeaning sound-bite. I found two previous threads on this topic; there are maybe 2-3 others that I can’t find right now.

> [@Unexpected behavior of #==#](https://discourse.julialang.org/t/unexpected-behavior-of/2891):
>
> Hi, I was playing around with multi line comments (in Julia v0.5.1) , and got some interesting results. So I tried: julia\> my#=comment=#var = 0 (generic function with 1 method) And now I get: julia\> 3 \* 4 0 So I just overloaded (\*) for (Any,Any). That’s weird. So, I wanted to retry in a way, that I can edit \*, so: import Base.\* my#=comment=#var = 0 This creates a new method for (\*), so “hi” \* false returns now 0. When I try this in Jupyter via Juliabox (Version 0.5), I get an error…

> [@Cannot use size(::Array{Int, 2}): ERROR: LoadError: UndefRefError: access to undefined reference](https://discourse.julialang.org/t/cannot-use-size-array-int-2-error-loaderror-undefreferror-access-to-undefined-reference/4138):
>
> I keep getting undefreferror whenever I call function size. Here is my code. The error is at the first if in function forward. Full error message is: ERROR: LoadError: UndefRefError: access to undefined reference in #forward#55(::Array{Any,1}, ::Function, ::NN.CrossEntropyLoss, ::Array{Float64,2}, ::Array{Int64,2}) at /Users/haonanchen/Documents/CS/NN.jl/src/layers/CrossEntropyLoss.jl:37 in forward(::NN.CrossEntropyLoss, ::Array{Float64,2}, ::Array{Int64,2}) at /Users/haonanchen/Documents/CS/…

With respect to Stefan Karpinski’s comment about not caring about users, I believe that the core-devs care very much about the user community. Indeed, Stefan personally deserves a medal for his patient and careful explanations on this discourse site! And the core-devs make huge numbers of other contributions to the user-base, including answering issues on github, arranging JuliaCon… the list is very long.

This issue is not about caring versus not caring about users; rather it is about balancing competing interests of two different groups of users. For the purpose of explanation, let me propose a straw-man “new syntax rule” (NSR): If a function `g` defined in an inner scope has the same name as an existing function `g` in an outer scope, then at least one argument of the inner `g` must have its type qualified (`::Any` is OK). Zero-argument functions are exempt.

For a power user who writes code-generation macros and other forms of introspective code (user group A), NSR would be a hindrance and an annoying speed bump.

For a Julia newbie, for a university-classroom user, and for a person prone to typos (user group B), NSR could save that person an hour or two of chasing down a “spooky-action-at-a-distance” bug caused by a typo.

My contention is that the current state of affairs in which a one-character typo can redefine an operator favors user group A too much over user group B.

---

_[View the full topic](https://discourse.julialang.org/t/redefining-x-y-0/17015)._
