<commit_before>---
layout: doc-page
title: Relationship with Scala 2 Implicits"
---

Many, but not all, of the new contextual abstraction features in Scala 3 can be mapped to Scala 2's implicits. This page gives a rundown on the relationships between new and old features.

## Simulating Contextual Abstraction with Implicits

### Implied Instance Definitions

Implied instance definitions can be mapped to combinations of implicit objects, classes and implicit methods.

 1. Instance definitions without parameters are mapped to implicit objects. E.g.,
    ```scala
      implied IntOrd for Ord[Int] { ... }
    ```
    maps to
    ```scala<commit_msg>Fix a typo<commit_after>---
layout: doc-page
title: Relationship with Scala 2 Implicits
---

Many, but not all, of the new contextual abstraction features in Scala 3 can be mapped to Scala 2's implicits. This page gives a rundown on the relationships between new and old features.

## Simulating Contextual Abstraction with Implicits

### Implied Instance Definitions

Implied instance definitions can be mapped to combinations of implicit objects, classes and implicit methods.

 1. Instance definitions without parameters are mapped to implicit objects. E.g.,
    ```scala
      implied IntOrd for Ord[Int] { ... }
    ```
    maps to
    ```scala
{'fraction_non_alphanumeric': 0.06989247311827956, 'fraction_numerical': 0.006144393241167435, 'mean_word_length': 3.772893772893773, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7246268', 'n_tokens_mistral': 349, 'n_tokens_neox': 330, 'n_words': 169}